Thomas Foster 2 Posted January 26, 2023 Share Posted January 26, 2023 Looking for a Date Subroutine in WebFOCUS that will create a list of calendar dates for a given month? Link to comment Share on other sites More sharing options...
Fredrik Rosell 3 Posted January 27, 2023 Share Posted January 27, 2023 Hello Thomas,To increase the chance that you receive an answer that is relevant to you, could you please clarify what particular TIBCO product are you using?ThanksFredrik Rosell (TIBCO) Link to comment Share on other sites More sharing options...
Thomas Foster 2 Posted January 27, 2023 Author Share Posted January 27, 2023 Hi Fredrik, The current Production WebFOCUS product being used is 8105M. Thomas Foster | senior engineer ii Enterprise Platforms American Express 1500 NW 136th Avenue | Sunrise, FL 33323 O: 954-503-5840 | M: 248-935-4473 E: thomas.foster@aexp.com Link to comment Share on other sites More sharing options...
Fredrik Rosell 3 Posted January 28, 2023 Share Posted January 28, 2023 Thank you for the clarification, Thomas! I have tagged this as a WebFOCUS question now. Link to comment Share on other sites More sharing options...
David Beagan Posted January 28, 2023 Share Posted January 28, 2023 There could be a number different answers depending on the specifics of what you are trying to do. Here's one. The following code could be put in a WebFOCUS procedure (a .fex file) and when run could prompt you for a value for the variable &Month in yyyymm format. This month is 202301.-DEFAULT &Month = 202302;-SET &Start = &Month | 01; TABLE FILE syscolum PRINT NAME NOPRINT COMPUTE Date/YYMD = IF LAST Date EQ 0 THEN '&Start' ELSE Date + 1; COMPUTE Month/YYM = Date; NOPRINT WHERE TOTAL Month LE '&Month' WHERE RECORDLIMIT LE 31 ON TABLE SET PAGE NOLEAD END In this example for 202302 output would be: Link to comment Share on other sites More sharing options...
Guest Posted January 30, 2023 Share Posted January 30, 2023 Hey Thomas, I don't know what you're going after here, but if you're looking to draw something that resembles a calendar, there are some HTML5 extensions that might be helpful like this one :https://github.com/ibi/wf-extensions-chart/tree/master/com.ibi.calendar_traditionalOf course if you just need a list of dates - like maybe to populate a dropdown, then there are a lot of ways to do that. Just passing this along.Toby Link to comment Share on other sites More sharing options...
Thomas Foster 2 Posted January 30, 2023 Author Share Posted January 30, 2023 Hi Toby, The requirements here for a report I am currently working on is to create a column in that report which shows all the calendar dates for a given month. This means that this column is not coming from a Database Field. It has to come from some function or sub-routine that is capable generating all the dates for a given month. All dates for the calendar month have to be represented in this column not just the dates where data occurs by a date field in the DB. Thomas Foster | senior engineer ii Enterprise Platforms American Express 1500 NW 136th Avenue | Sunrise, FL 33323 O: 954-503-5840 | M: 248-935-4473 E: thomas.foster@aexp.com Link to comment Share on other sites More sharing options...
Martin Yergeau Posted January 31, 2023 Share Posted January 31, 2023 One of the simple technique is as following.I've used David calendar, perform June 1994, extract employee's birth date for the same period and "merge" them-DEFAULT &MONTH = 199406;-SET &START = &MONTH | 01; SET HOLDLIST = PRINTONLY TABLE FILE SYSCOLUMPRINT NAME NOPRINT COMPUTE DATE/YYMD = IF LAST DATE EQ 0 THEN '&START' ELSE DATE + 1; COMPUTE MONTH/YYM = DATE; NOPRINT COMPUTE NB_EMPL /I3 = 0; AS 'NB_EMPL'WHERE TOTAL MONTH LE '&MONTH';WHERE RECORDLIMIT LE 31;ON TABLE HOLD AS DTEFILEEND-RUN TABLE FILE WF_RETAILSUM CNT.DST.EMPLOYEE_NUMBER/I3 AS 'NB_EMPL'BY DATE_OF_BIRTH AS 'DATE'WHERE DATE_OF_BIRTH GE '19940601' AND DATE_OF_BIRTH LE '19940630';ON TABLE HOLD AS DATAFILEEND-RUN TABLE FILE DTEFILESUM NB_EMPLBY DATEON TABLE SET PAGE-NUM NOLEADMOREFILE DATAFILEEND-RUNImportant thing is to have same number of field, same name & same format from merged files.You could also use the MATCH feature which gives you more flexibilities then MORE because you don't need to have same number of fields between the MATCHed files; only the fields used for the MATCH must be similar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now