Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]How to get today's date in different formats in header and footer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to get today's date in different formats in header and footer
 Login/Join
 
Guru
posted
Hi,


Iam trying to get the today's date in the header as May 20, 2016 @ 07:15 which is in EST time zone and today's date in the footer(get it displayed in the footer) as Fri May 20 07:15:16 EDT 2016 but Iam unable to get it using HGETC function or others too...

Could anyone please let me know how this can be achieved.

Thanks a lot in advance!

Regards,
IP

This message has been edited. Last edited by: <Emily McAllister>,
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
Can you provide what you did already (code) ?

Have you defined two variables (one for Heading and one for Footing) with different format ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Hi,

Iam trying to use like this :
-SET &HEADER_1 ='&DATEYYMD';
-SET &FOOTER_1 = '&DATEYYMD';

TABLE FILE CAR
PRINT *
HEADING
&HEADER_1
FOOTING
&FOOTER_1
END

but Iam not getting in the format as Iam expecting....

Please let me know how can this be achieved.

Thanks!
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Where is the HGETC?

If you want to play with DATE variables, pick one of this:

-TYPE &|DATE           : &DATE
-TYPE &|DATED          : &DATED
-TYPE &|DATEDMtrYY     : &DATEDMtrYY
-TYPE &|DATEDMY        : &DATEDMY
-TYPE &|DATEDMYY       : &DATEDMYY
-TYPE &|DATEDwMtrYY    : &DATEDwMtrYY
-TYPE &|DATEJ          : &DATEJ
-TYPE &|DATEJUL        : &DATEJUL
-TYPE &|DATEM          : &DATEM
-TYPE &|DATEMDwtYY     : &DATEMDwtYY
-TYPE &|DATEMDWtrY     : &DATEMDWtrY
-TYPE &|DATEMDY        : &DATEMDY
-TYPE &|DATEMDYY       : &DATEMDYY
-TYPE &|DATEMt         : &DATEMt
-TYPE &|DATEMT         : &DATEMT
-TYPE &|DATEMtDwY      : &DATEMtDwY
-TYPE &|DATEMtrDYY     : &DATEMtrDYY
-TYPE &|DATEMtrDwtYY   : &DATEMtrDwtYY
-TYPE &|DATEMTDWTRYY   : &DATEMTDWTRYY
-TYPE &|DATEMtr        : &DATEMtr
-TYPE &|DATEMTr        : &DATEMTr
-TYPE &|DATEMTR        : &DATEMTR
-TYPE &|DATEMTRDwY     : &DATEMTRDwY
-TYPE &|DATEMTRDY      : &DATEMTRDY
-TYPE &|DATEMTY        : &DATEMTY
-TYPE &|DATEMTrYY      : &DATEMTrYY
-TYPE &|DATEMY         : &DATEMY
-TYPE &|DATEMYY        : &DATEMYY
-TYPE &|DATEQ          : &DATEQ
-TYPE &|DATEQY         : &DATEQY
-TYPE &|DATEQYY        : &DATEQYY
-TYPE &|DATEW          : &DATEW
-TYPE &|DATEwJ         : &DATEwJ
-TYPE &|DATEWJ         : &DATEWJ
-TYPE &|DATEWt         : &DATEWt
-TYPE &|DATEWT         : &DATEWT
-TYPE &|DATEWtr        : &DATEWtr
-TYPE &|DATEWTr        : &DATEWTr
-TYPE &|DATEWTR        : &DATEWTR
-TYPE &|DATEY          : &DATEY
-TYPE &|DATEYBMBD      : &DATEYBMBD
-TYPE &|DATEYM         : &DATEYM
-TYPE &|DATEYMDWT      : &DATEYMDWT
-TYPE &|DATEYQ         : &DATEYQ
-TYPE &|DATEYY         : &DATEYY
-TYPE &|DATEYYQ        : &DATEYYQ
-TYPE &|DATEYMD        : &DATEYMD
-TYPE &|DATEYYJ        : &DATEYYJ
-TYPE &|DATEYYJUL      : &DATEYYJUL
-TYPE &|DATEYYM        : &DATEYYM
-TYPE &|DATEYYMD       : &DATEYYMD
-TYPE &|DATEYYMDW      : &DATEYYMDW
-TYPE &|DATEYYMtrD     : &DATEYYMtrD
-TYPE &|DATEYYMtrDW    : &DATEYYMtrDW

  


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
This will give you the date and time as a standard format, then it's yours to use date function and other IBI function to have it the format you want.
-*-SET &RUNDATE = EDIT(&YYMD,'9999/99/99');
-SET &RUNDATE = '&DATEYYMD';
-SET &RUNTIME = EDIT(&TOD,'99$:99$:99');

-SET &HEADER_1 = &RUNDATE || ' ' | &RUNTIME;
-SET &FOOTER_1 = &RUNDATE || ' ' | &RUNTIME;

TABLE FILE CAR
PRINT *
HEADING
"&HEADER_1.EVAL"
FOOTING
"&FOOTER_1.EVAL"
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
Good One


WebFOCUS 8.1.05 / APP Studio
 
Posts: 272 | Location: Brazil | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi,

Martin - Thanks for the format!It helped me Smiler

Richardo - I was able to get the DMY(Date Month Year Day) using the date comnands which you had given above...Can you please let me know how can I get the time too using the same formats ?

Thanks a lot in advance!

Regarda!
 
Posts: 270 | Registered: October 30, 2014Report This Post
Guru
posted Hide Post
Hi,


Richardo - I used the set variable for Time and used it along with one of the date formats which you had mentioned....
It worked!! Thanks a lot again Smiler

Regards,
IP
 
Posts: 270 | Registered: October 30, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]How to get today's date in different formats in header and footer

Copyright © 1996-2020 Information Builders