Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Reformat Calendar Prompting Results
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Reformat Calendar Prompting Results
 Login/Join
 
Expert
posted
We use the following -SET command in a lot in our fexes to prompt the user for a date, and they seem to like the calendar prompt.

-SET &START_DT = &START_DT.(|FORMAT=YYMD).Select Start Date.QUOTEDSTRING;

However, the problem is the resulting date value is formatted like this: ‘August 26 2020’ which is nice for display, but not for screening within the WHERE statements or DM Commands like DATEADD, etc or other dialogue manager friendly for other functions like DATECVT, DATEMOV, etc.
Do you know of a way to change the format returned by the calendar, such as the YYMD format?
We’ve discovered defines work to convert it, but we need to convert it in DM and not a fex.
Thanks, Doug

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3124 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Hey Doug,
Here's the LONG way - lol:

  
-SET &ALPHA_DT = 'August 26 2020';
-SET &GET_MONTH = GETTOK('&ALPHA_DT.EVAL', &ALPHA_DT.LENGTH, 1, ' ', 9, 'A9');
-SET &MTH_OUT =   DECODE &GET_MONTH (
-                 'January'   '01'
-                 'February'  '02'
-                 'March'     '03'
-                 'April'     '04'
-                 'May'       '05'
-                 'June'      '06'
-                 'July'      '07'
-                 'August'    '08'
-                 'September' '09'
-                 'October'   '10'
-                 'November'  '11'
-                 'December'  '12');

-SET &FMT_YYMD  = GETTOK('&ALPHA_DT.EVAL', &ALPHA_DT.LENGTH, 3, ' ', 4, 'A4') || 
-                 &MTH_OUT ||
-                 GETTOK('&ALPHA_DT.EVAL', &ALPHA_DT.LENGTH, 2, ' ', 2, 'A2');
-TYPE &FMT_YYMD
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1973 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks Tom... But, is there a way to change what the calendar actually outputs? Like, in good ol' days of the 'Calendar Control' settings in the 'HTML Composer'?
 
Posts: 3124 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Sorry Doug, I did while at Fordham w/App Studio.
There was definitely a way to format the output.
Don't have that anymore - using Dev Studio.


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1973 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
NP Tom, Another one (feature) bites the dust...
 
Posts: 3124 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
I was also told that "If the fields are correctly and consistently typed in the metadata this manipulation becomes moot." So, it's all about Synonyms... I hope.
 
Posts: 3124 | Location: Tennessee, Nashville area | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Tom, I'm not the last person still using Dev Studio? (I could use App Studio but I don't like it at all).


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 970 | Location: Oklahoma City | Registered: October 27, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Hey John,
LOL!!! Nope, there are a few of us left - personally, adapted to it for a few years.
Now in my LAST job, and, it's more of a SQL shop with WebFOCUS generating the output...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1973 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Reformat Calendar Prompting Results

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.