PRODUCT: Lotus 1-2-3 Version 2.0 ENVIRONMENT: run on MS Dos 3.2 up with COUNTRY=002 in config.sys THe first rough test called "datetest.wk1" is a trial just to refresh my memory on how everything still works. /wgfg (General format) set A B C D 1 Test Value @datevalue @year 2 @date( 36526 36526 100 3 number with / 2000 2000 5 4 quoted text 01-01-2000 ERR ERR 5 quoted text 02/29/2000 ERR ERR 6 @now 35460.513669 35460.513669 97 7 quoted text 01/01/00 1 0 8 quoted text 2000/01/01 ERR ERR 9 10 The difference in days between 01/01/2000 36526 11 and 29/02/2000 36585 12 is 59 59 13 14 99 days from 01/01/2000 36526 15 36625 is 9 month 16 4 day 17 2000 year 18 @today 35460 I then tried setting the Global format to 'Long International'. A disaster of course because it tries to interpret ALL the numbers as dates. Not good for a Balance Sheet. /wgf4 A B C D 1 Test Value @datevalue @year 2 @date( 01/01/2000 01/01/2000 09/04/00 3 number with / 22/06/05 22/06/05 05/01/00 4 quoted text 01-01-2000 ERR ERR 5 quoted text 02/29/2000 ERR ERR 6 @now 30/01/97 30/01/97 06/04/00 7 quoted text 01/01/00 01/01/00 00/01/00 8 quoted text 2000/01/01 ERR ERR 9 10 The difference in days between 01/01/2000 01/01/2000 11 and 29/02/2000 29/02/2000 12 is 28/02/00 28/02/00 13 14 08/04/00 days from 01/01/2000 01/01/2000 15 09/04/2000 is 09/01/00 month 16 04/01/00 day 17 22/06/05 year 18 @today 30/01/97 This is a list of the first rough test cell contents. A1: ' B1: [W16] 'Test Value C1: [W16] '@datevalue D1: ' @year A2: '@date( B2: [W16] @DATE(100,1,1) <-- here i tried to see how input via the @date function works It is correct as for a numeric content but the display sucks C2: [W16] @DATEVALUE(B2) D2: @YEAR(C2) A3: 'number with / B3: [W16] 2000/1/1 <-- this was a test to see if you could enter dates as numbers. Not. This says 2000 divided by 1 divided by 1 gives 2000. True but not useful C3: [W16] @DATEVALUE(B3) D3: @YEAR(C3) A4: 'quoted text B4: [W16] '01-01-2000 <- Now we try to enter a date as quoted text. Notice its gives ERR. It does not like the minus separators C4: [W16] @DATEVALUE(B4) D4: @YEAR(C4) A5: 'quoted text B5: [W16] '02/29/2000 <- again we try quoted text. Again ERR It likes the separators but hates month/day/year. Clever machine. C5: [W16] @DATEVALUE(B5) D5: @YEAR(C5) A6: '@now B6: [W16] @NOW <- by now we are getting a bit desperate. What does it like. So we display Todays date. We get a decimal number. (so we quickly go /wgf1 and back) So we know that it gives us 30/01/97 OK, Day, Month, Year (2 digits?) C6: [W16] @DATEVALUE(B6) D6: @YEAR(C6) A7: 'quoted text B7: [W16] '01/01/00 <- So we try 2 digit year This gives us '1'. Meaning Jan 1 1900 Correct, but not what we want C7: [W16] @DATEVALUE(B7) D7: @YEAR(C7) A8: 'quoted text B8: [W16] '2000/01/01 <- so we try Year, Month, Day. Nope C8: [W16] @DATEVALUE(B8) D8: @YEAR(C8) A10: 'The difference in days between C10: [W16] '01/01/2000 <- Now we know what we can do. It likes day, month, Year (4 digit) D10: @DATEVALUE(C10) B11: [W16] 'and C11: [W16] '29/02/2000 <- Now we select a second date D11: @DATEVALUE(C11) B12: [W16] 'is C12: [W16] @DATEVALUE(C11)-@DATEVALUE(C10) <- and find the difference which is 59 days D12: +D11-D10 A14: 99 <- store 99 days B14: [W16] 'days from C14: [W16] '01/01/2000 D14: @DATEVALUE(C14) <- store numeric value of Jan 1 2000 A15: +A14+D14 <- add them B15: [W16] 'is C15: [W16] @DAY(A15) <- now we convert back from our calcs D15: 'month C16: [W16] @MONTH(A15) <- find month D16: 'day A17: ^ C17: [W16] 1900+@YEAR(A15) <- we adjust to display actual year D17: 'year A18: '@today B18: [W16] @INT(@NOW) <- just for fun we display todays date without the time C18: [W16] ^ So we know that 99 days from Jan 1 2000 is April 9 2000 Displaying the result however is a pain.
To ensure your dates work in a Y2k manner for Lotus 2.x follow these rules:
1. Use Global format 'General' 2. Input dates as quoted literals. Single quote (') aligns display left. Double quote (") aligns display right. 3. Dates from 1st January 1900 thru December 1999 should be encoded as 'dd/mm/yy or "dd/mm/yy 4. Dates from 1st January 2000 thru 31st December 2099 should be encoded 'dd/mm/yyyy or "dd/mm/yyyy 5. Date columns should have a default width of 10 6. Any transfer method must retain the quotes in the dates