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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you have any questions or need access: Contact firstname.lastname@example.org
sure look up the AYMD function. you'll need to translate these character strings into smart dates, there are many ways to do that. one way uses the date convert function DATECVT. Smart dates being the focus word for integers underlying the date formatting map, integers representing the number of days elapsed since the base date of jan1 1900. Smart dates are the way to do all the arithmetic you need. Look them both up in your FUNCTIONS manual There are a number of threads on this board about DATES. So do a board search here as well. You'll enjoy what you'll learn.
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
The WebFOCUS 53 "Using Functions" Document (DN4500583.0904) has the following explanation for using the DATECVT function.
DATECVT(date, 'infmt', 'outfmt'[, outfield])
WHERE infmt Alphanumeric Is the format of the date enclosed in single quotation marks. It is one of the following: * A non-legacy date format (for example, YYMD, YQ, M, DMY, JUL). * A legacy date format (for example, I6YMD or A8MDYY). * A non-date format (such as I8 or A6). A non-date format in infmt functions as an offset from the base date of a YYMD field (12/31/1900).
Going by that you should be able to use the following code to convert the date
DEFINE FILE CAR -* Using A8MDYY Format DATEA8/A8 WITH CAR = '01012005'; DTEONE/MDYY = DATECVT(DATEA8,'A8MDYY','MDYY'); -* USING A6 Format Approximately 100 years (365 * 100) from the base date of (12/31/1900) DATEA6/A6 = '36500'; DTETWO/MDYY = DATECVT(DATEA6,'A6','MDYY'); END TABLE FILE CAR PRINT DATEA8 DTEONE DATEA6 DTETWO END
Hope that helps MThis message has been edited. Last edited by: <Maryellen>,
Posts: 33 | Location: New York, USA | Registered: August 11, 2003