How do you format DATEADD function so that time is not included?


#1

I’m using the DATEADD function to find the next date to perform a task. It works fine, except the result also includes the time. So “DATEADD({Admit Date}, 1, ‘days’)” returns “5/31/2013 12:00:00”. I want it to return the date only in this field. Any way to do that?


#2

Hi Les,

If you use DATETIME_FORMAT, you can format the output of DATEADD to look however you want. So in your case, for example, you would probably want to write:

DATETIME_FORMAT(DATEADD({Admit Date}, 1, ‘days’), ‘M/D/YYYY’)

in the formula field. This would return just the date, without the timestamp.


#3

Thank you so much! I knew DATETIME_FORMAT needed to be in there somewhere, I just couldn’t get it placed properly. You solved my problem.

Les