Focal Point
Getting YEAR part from &DATEYYMD in Dialogue manager

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

April 05, 2007, 10:46 AM
Prasanna
Getting YEAR part from &DATEYYMD in Dialogue manager
All,
I am trying to fetch the YEAR part alone from the Current date, using Dialogue manager.But i am not able to get it.I got WF_1001_dates_sample.pdf from the forum, in that it was given fetching year with Quarter and month.Using DATECVT i tried, but it accepts only MMDY kind of format.We cannot the set the data type for a variable in the dialogue manager.Can any one suggest how to fetch YEAR part alone using dialogue manager.

Regards
R.Prasanna
April 05, 2007, 10:51 AM
Francis Mariani
-SET &AYEAR = EDIT(&DATEYYMD,'9999$');

-TYPE &DATEYYMD
-TYPE &AYEAR


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 05, 2007, 04:25 PM
Danny-SRL
Prasanna, Francis,

Just use &DATEYY


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

April 05, 2007, 04:45 PM
Francis Mariani
Daniel,

Thanks!

When I queried the amper variables with -? &, &DATEYY didn't show up, for that matter, neither did &DATEYYMD.

And, of course, I cannot find &DATEYY in the 5.3 documentation.

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 06, 2007, 01:02 AM
susannah
ah.. WebFocus Key Sheet ... best twenty five bucks you'll ever spend! well, ok maybe not, but its worth its weight in gold. you'll find all sorts of &date vars you never thought of.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
April 06, 2007, 07:44 AM
Danny-SRL
Francis,

You can use after &DATE all the formats:
&DATEMYY
&DATEDMtrYY
&DATEQYY
and so on.
BTW, this was documented when the &DATE came out in 1999 in advance of the "bug 2000".


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

April 06, 2007, 08:39 AM
FrankDutch
Worthful info Danny...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

April 09, 2007, 11:00 AM
Francis Mariani
Danny,

Do you know where they're documented? As far as I can tell, they're only in the third-party WebFOCUS Key Sheet book.

These are mentioned in the 5.3 manual: &DATE, &DATEDMY, &DATEDMYY, &DATEMDY, &DATEMDYY, &DATEYMD, &DATEYYMD, &DMY, &DMYY, &MDY, &MDYY, &TOD, &YMD, &YYMD, but only in a section on using reserved amper variables in a DEFINE in a Master.

I've been using &DATEDMtrYY for a while, though it's not documented.

It would be nice to have the complete list in the documentation.

Cheers.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 09, 2007, 03:49 PM
Danny-SRL
Francis,
As I said, you can add after &DATE any FOCUS date format you want and FOCUS will return the date in that format.
I can't tell you offhand where is the documentation, but back in 1999, when the year 2000 was looming ahead, it was well known. Also, if you look in the MF Focus manual for developping applications, you will find:
&DATEfmt: Any date format. Returns the current date, where fmt can be
any combination of YYMD, MDYY, etc.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

April 10, 2007, 09:22 AM
<lfrerker>
Available Date Display formats are listed in the Describing Data manual for WF 5.x in chapter 4 pages 27-29, in the WF 7.x Describing Data manual chapter 5 page 43, however the WF 7.x manual does not mention the 'r, R' option.