DateAdd Equivalent

Moderator: NorbertKrupa

Post Reply
stwp86
Newbie
Newbie
Posts: 11
Joined: Mon Nov 12, 2012 7:06 pm

DateAdd Equivalent

Post by stwp86 » Mon Dec 10, 2012 6:13 pm

Does anyone know, off of the top of their head, if there is a Dateadd equivalent available in Vertica SQL? In MSSQL you feed in the following:

DATEADD(datepart, number, date)

I want to do something like this:

To_Char(Timestamp_Trunc(wo.Start_Date, 'DAY')+1, 'MM/DD/YYYY') >= Dateadd(, -4, ?)

The ? is a parameter that will give the ending date (via report builder report), so basically it is looking at the last four weeks worth of data.

Thanks for the help!

Travis

jpcavanaugh
Intermediate
Intermediate
Posts: 149
Joined: Mon Apr 30, 2012 10:04 pm
Location: New York
Contact:

Re: DateAdd Equivalent

Post by jpcavanaugh » Mon Dec 10, 2012 8:33 pm


stwp86
Newbie
Newbie
Posts: 11
Joined: Mon Nov 12, 2012 7:06 pm

Re: DateAdd Equivalent

Post by stwp86 » Mon Dec 10, 2012 10:57 pm

Thanks, I found it earlier in some documentation . . . it is Timestampadd

Post Reply

Return to “New to Vertica SQL”