date time arithmatic in 8.1 parallel
Posted: Sun Jun 02, 2013 8:39 am
Hi
I need some help with date time arithmetic.
I have read a lot of threads and read all about the various date and time functions but have not been able to figure out how to achieve what i need.
My table has the following two fields -
start_date
start_time
The initial date and time values will be passed to the job as job parameters -
for example
07/01/2013 and
00:00:00
Then with each incoming row i need the time part to increment by 1 second and obviously when the seconds reaches 60, it should reset to 0 and minute should increment by 1 and when minutes reach 60, it should reset to 0 and hour should increment by 1....hour reaches 24 it should reset to 00 and the date should increment by 1 ....
(don't ask me why. It is a weird requirement)
All the nice functions like TimestampOffsetBySeconds etc are in 8.5 ...we are still using 8.1 ...can't figure out how to do this.
Please help.
I need some help with date time arithmetic.
I have read a lot of threads and read all about the various date and time functions but have not been able to figure out how to achieve what i need.
My table has the following two fields -
start_date
start_time
The initial date and time values will be passed to the job as job parameters -
for example
07/01/2013 and
00:00:00
Then with each incoming row i need the time part to increment by 1 second and obviously when the seconds reaches 60, it should reset to 0 and minute should increment by 1 and when minutes reach 60, it should reset to 0 and hour should increment by 1....hour reaches 24 it should reset to 00 and the date should increment by 1 ....
(don't ask me why. It is a weird requirement)
All the nice functions like TimestampOffsetBySeconds etc are in 8.5 ...we are still using 8.1 ...can't figure out how to do this.
Please help.