PRB: Problems Importing Dates from Lotus Spreadsheet to FoxProID: Q88860
|
Under some circumstances, when the IMPORT command is used to load dates from a Lotus spreadsheet into a FoxPro database, FoxPro loads the Lotus date number and does not properly translate the value to a date. The date may be imported as a character value or as a numeric value.
To correct this problem, do the following:
REPLACE ALL <new_field> WITH CTOD(SYS(10,<old_field>+2415019))
If the date number was imported as a character value, execute the
following command to copy the date to the new field:
REPLACE ALL <new_fld> WITH CTOD(SYS(10,VAL(<old_fld>)+2415019))
Lotus stores dates as the (nonnegative) number of days from January 1, The number 2415019 is the corresponding Julian date. By adding this offset to the Lotus date value, FoxPro can correctly translate the date.
Additional query words: 123 Symphony WR1
Keywords : FoxDos FoxWin FxinteropSpread KBQ
Version : MS-DOS:2.0,2.5,2.5a,2.5b,2.6; WINDOWS:2.5,2.5a,2.5b,2.6
Platform : MS-DOS WINDOWS
Issue type : kbprb
Last Reviewed: April 26, 1999