Focal Point
[Solved] Print the current system Date & Time on Report Footing

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6371036992

September 17, 2008, 06:28 AM
Daren
[Solved] Print the current system Date & Time on Report Footing
Its easy to print the Date on the footing, but how do I print the current system time.

I need a timestamp on the report since it is run many times a day.

This message has been edited. Last edited by: Daren,


Web Focus 7.6.5
JDE World
September 17, 2008, 06:33 AM
<JG>
-SET &TS=HHMMSS('A8');
TABLE FILE CAR
FOOTING BOTTOM
" &DATE &TS "
SUM DC
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
END
September 17, 2008, 06:44 AM
Daren
It worked perfectly.

Thanks


Web Focus 7.6.5
JDE World
September 17, 2008, 07:23 AM
GamP
Daren,
Please edit the description of the topic so that it reads [SOLVED].
Thanks,


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 17, 2008, 08:46 AM
TexasStingray
There is also a system variable &TOD that is already populated with time in hh.mm.ss format.

To get a list of system variable execute the code below.

-? &

This message has been edited. Last edited by: TexasStingray,




Scott

Correct,

&TOD
"Returns the current time.
When you enter FOCUS, this variable is updated to the current system time only when you execute a
MODIFY, SCAN, or FSCAN command.

To obtain the exact time during any process, use the HHMMSS subroutine"

In this case unless it's a very long running process &TOD would almost certainly do.

IF you want in process timestamps then you need HHMMSS.
Hi,

I need time format like 23:54:43.12

how to get it ... I use &TOD which gives 23.54.43


In Focus since 2008
WebFOCUS 8.2.0.1
Windows 7 - IE,Chrome,Firefox
Excel, PDF, HTML, AHTML, XML
JavaScript, jQuery, D3.js, Highcharts
do a search on HYYMDm


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
I have used this

  DT1/HYYMDs = HGETC(8, 'HYYMDs'); 


but it gives me a format like

 2010/06/07 17.50.43.426 


I am trying to truncate the last character from the above string .. like i need to get the time as 17:50:43.43


In Focus since 2008
WebFOCUS 8.2.0.1
Windows 7 - IE,Chrome,Firefox
Excel, PDF, HTML, AHTML, XML
JavaScript, jQuery, D3.js, Highcharts
Is there a reason to round the time at 100 milliseconds ?

You are limited with Date/Time formats.

Although the manual describes the format HYYMDS{x}, where x is the number of digits, I could not get it to work with a COMPUTE or a DEFINE.

You may have to convert the time with HTIME to get a numeric and round the number.


Waz...

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!