Focal Point
[SOLVED]Get 12 hours ago from current datetime

This topic can be found at:

April 19, 2016, 01:16 PM
[SOLVED]Get 12 hours ago from current datetime
I need to get 12 hours ago from the current date time in date time format. After some searching i have the ability to get one day ago (below) however i would like to just specify 12 hours ago.

current datetime is 2016-04-19 21:00
then get variable for 2016-04-19 09:00

current datetime is 2016-04-19 10:00
then get variable for 2016-04-18 22:00

-*this is what i have for one day ago from current datetime, i'm not sure if i can build on it?

This message has been edited. Last edited by: <Emily McAllister>,
April 19, 2016, 01:38 PM
Try this:


App Studio
WebFOCUS 8.1.05M
Windows, All Outputs
April 19, 2016, 01:49 PM

Thanks Squatch, this works:


WebFocus 8.02, SQL Server 2008r2
April 19, 2016, 06:17 PM
Please add [SOLVED] or [CLOSED] to the title your first post in this thread.

This way we all know its been resolved.


Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!