Skip to main content

DATETIME_FORMAT generate error in DATEADD

  • December 18, 2018
  • 1 reply
  • 5 views

I get an error when I use DATEADD with a date I formated in another field with DATETIME_FORMAT.
Is there a way to “unformat” a date?

1 reply

Forum|alt.badge.img+17

DATETIME_FORMAT() returns a string, so you can’t use then DATEADD(). You can:

  • Use the DATEADD() before the DATETIME_FORMAT()
  • Use DATETIME_PARSE() to get back a date, and then use the DATEADD()