subtract one minute from datetime in powerbuilder -
i have seen lot of info on how subtract 1 datetime other , how add years on datetime. following giving me headache. how subtract 1 minute date in powerbuilder?please , support.
thanks & regards rahul g
this how done in powerscript. easier if did in sql using dateadd function.
datetime ldt_thedate, ldt_newdate
time lt_thetime
// current date-time
ldt_thedate = datetime(today(), now())
// subtract 1 minute
lt_thetime = relativetime(time(ldt_thedate), -1)
// assemble date-time
ldt_newdate = datetime(date(ldt_thedate), lt_thetime)
Comments
Post a Comment