Date/Time add hours
Hi.
How can I add/substract hours from $Horolog in ObjectScript and the date part of $H is also affected?
Regards,
Matjaž
Product version: IRIS 2020.1
Hi.
How can I add/substract hours from $Horolog in ObjectScript and the date part of $H is also affected?
Regards,
Matjaž
One thing to keep in mind with mode -2 is that the range of valid dates varies by platform. I think Windows is the most limited right now, throwing an ILLEGAL VALUE error for dates prior to 1970.
Hi.
Tnx for your answer. I was looking for intrinsic function...
Regards,
Matjaž
You should be able to use the $SYSTEM.SQL.DATEADD("hh",1,$H)
It returns a timestamp you'd need to convert back to $H format if that's what you need.
It's true, prior 1970 $ZDateTime with -2 format throws error. But that's no problem, because I'm using current date/time only. So the Robert's solution is fine for me.
Tnx!