Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Return Carriage within a Formula for DATETIME_FORMAT SET_TIMEZONE

Topic Labels: Formulas
Solved
Jump to Solution
381 3
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to add an additional carriage return within this formula where the red maple leaf is in the below formula. I’ve tried multiple different ways but I’m unable to find success. If anyone has any solutions would be most appreciative!!!

CONCATENATE(Patient, “\n”, DATETIME_FORMAT(SET_TIMEZONE({Start Date}, ‘America/New_York’), ‘LT - dddd :maple_leaf: MMM DD/YYYY’))

1 Solution

Accepted Solutions

I’m not sure if it’s a bug or not that you can’t specify \n for a carriage return within a Date/Time format specifier, but I would just split your formula into multiple parts like this:

CONCATENATE(
Patient,
"\n",
DATETIME_FORMAT(SET_TIMEZONE({Start Date}, 'America/New_York'), 'LT - dddd'),
"\n",
DATETIME_FORMAT(SET_TIMEZONE({Start Date}, 'America/New_York'), 'MMM DD/YYYY')
)

Hope this helps! If this answers your question, could you please mark this comment as the solution to your question? This will help other people who have a similar question. :slightly_smiling_face:

See Solution in Thread

3 Replies 3

I’m not sure if it’s a bug or not that you can’t specify \n for a carriage return within a Date/Time format specifier, but I would just split your formula into multiple parts like this:

CONCATENATE(
Patient,
"\n",
DATETIME_FORMAT(SET_TIMEZONE({Start Date}, 'America/New_York'), 'LT - dddd'),
"\n",
DATETIME_FORMAT(SET_TIMEZONE({Start Date}, 'America/New_York'), 'MMM DD/YYYY')
)

Hope this helps! If this answers your question, could you please mark this comment as the solution to your question? This will help other people who have a similar question. :slightly_smiling_face:

Thanks so much, truly grateful for you!!! :raised_hands: :slightly_smiling_face: :thumbs_up:

You’re welcome! Glad I could help! :slightly_smiling_face: