[SOLVED] Date / Time values as Local or Global variables
Hello all - I am hoping for help with a coding issue as unfortunately searching through both documentation and Focal Point has not provided quite the answer I am looking for. I have date/time values I would like to use as variables either from inside the fex or as an include. I have reviewed info on -WRITE, -READ, -SET, etc. but it is critical these variables be date/time values... The code below shows the date/times used, following that is the resulting values.
These values need to be used both in multiple "where" statements as well as on the report. Any thoughts? (Thank you!)
SET HOLDLIST=PRINTONLY SET ASNAMES=ON -* DEFINE FILE CAR CDTETIM/HYYMDm = HGETC(10, 'HYYMDm'); PRE_MONTH/HYYMDm = HADD(CDTETIM, 'MONTH', -1, 10, 'HYYMDm'); TRAN_DATE/YYMD = HDATE(PRE_MONTH, 'YYMD'); DATE_BOM/YYMD = DATEMOV(TRAN_DATE, 'BOM'); DTETIM_BOM/HYYMDm = HDTTM(DATE_BOM, 10, 'HYYMDm'); -* DATE_EOMA/YYMD = DATEMOV(TRAN_DATE, 'EOM'); DTETIM_EOMB/HYYMDm = HDTTM(DATE_EOMA, 10, 'HYYMDm'); DTETIM_EOMD/HYYMDm = HADD(DTETIM_EOMB, 'DD', 1, 10, 'HYYMDm'); DTETIM_EOM/HYYMDm = HADD(DTETIM_EOMD, 'MC', -1, 10, 'HYYMDm'); RPTMNTH/Mtr = DATE_BOM; END TABLE FILE CAR PRINT RPTMNTH AS 'REPORT_MONTH' CDTETIM AS 'REPORT_TIME' DTETIM_BOM AS 'MNTH_BEGIN' DTETIM_EOM AS 'MNTH_END' 'CAR.CARREC.MODEL' NOPRINT WHERE RECORDLIMIT EQ 1 ON TABLE NOTOTAL END
REPORT_MONTH REPORT_TIME MNTH_BEGIN MNTH_END November 2013/12/27 16:21:32.055036 2013/11/01 00:00:00.000000 2013/11/30 23:59:59.999999This message has been edited. Last edited by: <Kathryn Henning>,
Production: WebFocus 8.0.09 Test: WebFocus 8.0.09 Windows, Z-Linux, and ZOS. all output Focus - 7.2.7