I have seen a lot of info on how to subtract one datetime from the other and how to add years on to a datetime. but the following is giving me a headache. How to subtract 1 minute from date in powerbuilder?please help and support.
Thanks & Regards Rahul G
This is how it is done in PowerScript. It would be easier if you did it in SQL using the DateAdd function.
DateTime ldt_thedate, ldt_newdate
Time lt_thetime
// get the current date-time
ldt_thedate = DateTime(Today(), Now())
// subtract 1 minute
lt_thetime = RelativeTime(Time(ldt_thedate), -1)
// assemble the date-time
ldt_newdate = DateTime(Date(ldt_thedate), lt_thetime)