Focal Point
[SOLVED] Date/Time

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

September 23, 2013, 05:07 PM
texgator
[SOLVED] Date/Time
I need to put the date/time stamp in the output file name in the format YYYYMMDDHHMMSS(20130923141123) without any decimals in between. Is there a function or system variable that would give me that in Webfocus. The ones I came across put a dot to seperate e.g. minutes from seconds. Thanks.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
September 23, 2013, 05:53 PM
prodrigu
texgator,

Would the below code work for you?

  
-SET &HOUR    = EDIT(&TOD,'99');
-SET &MINUTES = EDIT(&TOD,'$$$99');
-SET &SECONDS = EDIT(&TOD,'$$$$$$99');

-SET &TIME = &YYMD||&HOUR||&MINUTES||&SECONDS;

-TYPE DATE_TIME_STAMP : (&TIME)


Please let me know.

prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
September 23, 2013, 06:01 PM
Waz
You could also try the Timestamp functions.

-SET &TS = HCNVRT(HGETC(8, 'HYYMDs'), '(H17)', 17, 'A17') ;
-TYPE Timestamp = &TS



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!

September 24, 2013, 12:23 PM
texgator
Thanks guys!


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
September 24, 2013, 04:52 PM
Waz
If this is solved, then pleasse edit your first post in this thread and add [CLOSED] or [SOLVED] to it.


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!