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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I am trying to print the date used as a report input parameter to the report title but to display it in a different format. I am current prompting for START_DT whose date format is YYMD (ie: 20060930). When I add this to the heading title for display as &START_DT, it displays fine as 20060930. I want to display is as 09/30/2006.
I have added a define to change the format of the prompt field:
df_START_DT/MDYY = &START_DT
The code for the heading is as follows:
HEADING "Billing Account Report" "PO Nbr : &PO_NBR , Vendor : "Date Range From : &Start_DT
When I run it a get the error: INVALID DATE CONSTANT.
I've tried other formats but get similiar results. What am I doing wrong?
Guillo, you've got to convert it first. It starts life as a characterstring. you have to convert it from a character string to a smart date. You can use the DATECVT function if you like, it works fine in DM. There are a lot of other ways
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I believe that I've used the format as you've indicated. I guess what I'm asking is, is the standard form for dates actually YYMD since what is displayed and entered in the prompt is in the form of: 20061001 (YYMD)?
-SET &START_DT ='20060906'; DEFINE FILE CAR DF_START_DX/YYMD = DATECVT(&START_DT,'I8YYMD','YYMD'); DF_START_DT/MDYY = DATECVT('&START_DT','A8YYMD','MDYY'); END TABLE FILE CAR PRINT DF_START_DT DF_START_DX BY COUNTRY END
The quotes around the in and out are required and since &start_dt is not really YYMD you need I8 or A8 and quotes as needed.
Sandy
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004
nuance...format YYMD indicates a 'smart date' a smart date is an integer , the number days elapsed since the beginning of the last millenium, its a number on the order of 38000. Your &var date is most likely 20060517 which isn't YYMD, its I8YYMD, even tho it might look like YYMD, it isn't.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
DM "thinks" in alpha or numeric only. You can define a smart date field directly from a DM variable. I think yours didn't work because you tried to drop &START_DT into a MDYY and 20 is not a valid month.
Although you've been given a solution, I wanted to post about why your initial approach didn't work. You could have tweaked it as follows: -SET &VAR1 = 20060930; DEFINE FILE CAR DATE1/YYMD = &VAR1; DATE2/MDYY = DATE1; -* or if you want to do it in one step... DATE3/MDYY = EDIT(EDIT('&VAR1','$$$$99') | EDIT('&VAR1','$$$$$$99') | EDIT('&VAR1','9999')); END -* TABLE FILE CAR HEADING "DATE2: "DATE3: PRINT COUNTRY END Always a bunch of ways to do stuff in FOCUS....
Posts: 118 | Location: DC | Registered: May 13, 2005
Originally posted by Guillo: I am trying to print the date used as a report input parameter to the report title but to display it in a different format. I am current prompting for START_DT whose date format is YYMD (ie: 20060930). When I add this to the heading title for display as &START_DT, it displays fine as 20060930. I want to display is as 09/30/2006.
I have added a define to change the format of the prompt field:
df_START_DT/MDYY = &START_DT
The code for the heading is as follows:
HEADING "Billing Account Report" "PO Nbr : &PO_NBR , Vendor : "Date Range From : &Start_DT
When I run it a get the error: INVALID DATE CONSTANT.
I've tried other formats but get similiar results. What am I doing wrong?
is &START_DT an input field then you need to user it as df_START_DT/MDYY = '&START_DT';