Skip to main content
Solved

Return Carriage within a Formula for DATETIME_FORMAT SET_TIMEZONE

  • September 28, 2020
  • 3 replies
  • 29 views

Forum|alt.badge.img+12

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’))

Best answer by ScottWorld

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:

3 replies

ScottWorld
Forum|alt.badge.img+35
  • Genius
  • Answer
  • September 28, 2020

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:


Forum|alt.badge.img+12
  • Author
  • Inspiring
  • September 28, 2020

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:


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • September 28, 2020

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