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 would like to default the date in a pair of calendar controls in a report. For a given date (CurrentDate for example) the first calendar control would have the first day of the month set as default. The second caledar control would have the last day of the month set as default. These dates will be passed downstream as parameters to drill-down reports so I want to keep them in a date format. Does anyone have a way of computing the last day of the month as a Date?
Thanks
Posts: 19 | Location: WI | Registered: July 06, 2005
well, it depends. if you're going to do the date work in dialog manager, using your system date &YYMD for the current date for the beginning date: take the year and month of the current date and set the day to 01 for the ending date: add a full month to that result then subtract 1 day -SET &THISMONTH = EDIT(&YYMD,'999999'); -SET &NEXTMONTH = AYM(&THISMONTH,1,'YYM'); -SET &STARTDATE = &THISMONTH*100 + 1 ; -SET &ENDDATE = &NEXTMONTH*100 + 1; -SET &ENDDATE = AYMD ( &ENDDATE, -1, 'YYMD'); -TYPE &|STARTDATE = &STARTDATE &|ENDDATE = &ENDDATE and you get &STARTDATE = 20051201 &ENDDATE = 20051231
If you're going to define these dates in a file then first convert your system date to a focus smart date with the DATECVT function then use the DATEMOV function, which has cool operators to do all the heaving lifting for you. DEFINE FILE CAR THISDATE/I8YYMD WITH CAR= &YYMD ; TODAY/YYMD = DATECVT( THISDATE ,'I8YYMD' ,'YYMD' ) ; FIRST/YYMD = DATEMOV(TODAY,'BOM'); LAST/YYMD = DATEMOV(TODAY,'EOM'); END TABLE FILE CAR PRINT TODAY FIRST LAST END which gives you smart dates TODAY FIRST LAST 2005/12/27 2005/12/01 2005/12/31 Avoid using the DAYMD function, unless you need it. It produces a date using the microsoft epoch, which is 1 year different, very handy if you want to bring dates out of focus and into excel as real dates.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I'm choosing the &variable path as querying my date table takes several seconds and my downstream use of the date is with an &variable. &variables in this case are fast except the return is in the Gregorian date format. The calendar control does not work with this format. It needs to be in mm/dd/yyyy format with the slashes.