Hi All
Can any one help with the command for subtracting hours from a date time field in uservariable activity stage.
For eg if I have a input value as 2015-09-21 10:00:00, need to subtract 2 hrs from it and need o/p like 2015-09-21 08:00:00
I think Iconv/oconv function will work.If any one knows please post the syntax for the same
To susbtract hours from DATETIME field
Moderators: chulett, rschirm, roy
Only in a Parallel job, this is a Sequence job question.
Yes, you could use them in a custom routine but it would be a little tricky as the date and time portions would have to be handled separately. I.E. separate them and then subtract two hours (7200 seconds) from the time portion. If it rolls below zero (midnight) sutract one day from the date and adjust the time accordingly. Now, I may be misremembering the behaviour when you roll a time back past midnight, you'd need to test that yourself - you may just need the "delete one day" part in that case.
Ray, is your website not up? Moved? Gone? Was going to point them to your routines since you've already done all this but it seems to be down.
Yes, you could use them in a custom routine but it would be a little tricky as the date and time portions would have to be handled separately. I.E. separate them and then subtract two hours (7200 seconds) from the time portion. If it rolls below zero (midnight) sutract one day from the date and adjust the time accordingly. Now, I may be misremembering the behaviour when you roll a time back past midnight, you'd need to test that yourself - you may just need the "delete one day" part in that case.
Ray, is your website not up? Moved? Gone? Was going to point them to your routines since you've already done all this but it seems to be down.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: