10-06-2011 10:08 AM
I would like a date one day away from the value in a datetime field. My new field is getting created with one day subtracted but all of the times are not preserved. They all get set to 00:00:00.
What am I doing wrong?
10-06-2011 10:16 AM
You are doing nothing wrong. Check the "alignment" documentation for intnx.
The "old fashioned" way to subtract one day from a datetime variable is to simply subtract 1 day's worth of seconds.
newdt = olddt - 24*60*60;