Skip to main content

Formatting DATEADD in IF statement

  • October 22, 2018
  • 2 replies
  • 50 views

Brent_del_Rosar
Forum|alt.badge.img+8

I’m wondering how I would add the DATETIME_FORMAT (if that’s correct) formula into the current formula so that the output is MM/DD/YYYY instead of the format shown within the red circle.

‘Linesheet’ is a DATEADD formula, if that matters.

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+18

You would surround DATEADD(...) with DATETIME_FORMAT(...) so that its output is what gets formatted.

IF(
   {New Color}="Y",
   DATETIME_FORMAT(
      DATEADD(
         Linesheet,
         5,
         'week'
      ),
      'l'
   ),
   "Done"
)

Brent_del_Rosar
Forum|alt.badge.img+8
  • Author
  • Known Participant
  • October 22, 2018

You would surround DATEADD(...) with DATETIME_FORMAT(...) so that its output is what gets formatted.

IF(
   {New Color}="Y",
   DATETIME_FORMAT(
      DATEADD(
         Linesheet,
         5,
         'week'
      ),
      'l'
   ),
   "Done"
)

Thanks! It worked. Much appreciated.