Oneill0003
asked on
Using GetDate() in SSIS with Derived transformation
Guys:
I’m trying to add a new column using the Derived Column transformation; I need to accomplish the following but not having any luck:
Need to substract 1 ½ day from Current time.
This is what I have:
GETDATE() – 1.5
This is not working, I know I have to use a cast operator but can’t figure out which one.
I’m trying to add a new column using the Derived Column transformation; I need to accomplish the following but not having any luck:
Need to substract 1 ½ day from Current time.
This is what I have:
GETDATE() – 1.5
This is not working, I know I have to use a cast operator but can’t figure out which one.
ASKER
What about if i need to substract 20 minutes?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks drydenhogg that worked great!
DATEADD("Minute",-20,GETDA TE())
DATEADD("Minute",-20,GETDA
use
dateadd(h,-36,getdate())
ie 36 hours
the date day subtraction uages only allows for integer days...