SQL geeks out there?

Gotyour6's Avatar
I need a SQL function that will display the current date plus 5 days.

Right now the value is source.DTM01

I need it to be source.DTM01 (Plus five days of the value)

So if DTM01 brings in 08202014 then it will be 08252014.

Our SQL guy is out sick and need to write a condition and i am a bit rusty.
Does this help?

The DATEADD() function adds or subtracts a specified time interval from a date.

Syntax: DATEADD(datepart,number,date)

Ex. To add 5 days to an OrderDate:
DATEADD(day,5,OrderDate)

Rev


I need a SQL function that will display the current date plus 5 days.

Right now the value is source.DTM01

I need it to be source.DTM01 (Plus five days of the value)

So if DTM01 brings in 08202014 then it will be 08252014.

Our SQL guy is out sick and need to write a condition and i am a bit rusty. Originally Posted by Gotyour6
Gotyour6's Avatar
Expression is syntactically valid

Thank you

Driving me insane
I'm not a programmer, but I boinked my favorite girl last night at a Holiday Inn.

Glad it helped. Lol

Rev
Gotyour6's Avatar
I used to be 15 years ago.
If you dont use it it seems to go away quickly.

Which is the reason I fuck as often as I do.