General information
Category:
Coding, syntax & commands
Title:
Appending dates from a sdf file
VFP5 and VFP6 seem to both have trouble appending dates from a sdf file when the dates are mm/dd/yy or yy/dd/mm. We could perhaps get our vendors to change their date formats, or append dates into character fields and then write code to play with them.
I appended a file of 4 dates into a table in 2.6, 5, and 6, with varying settings (see comments and original dates in right column). Neither VFP version performs satisfactorily, although 6 is somewhat less off the wall than 5. I got the same results appending into a vfp table.
Record# DT COMMENTS
1 / / fox 5 with defaults
2 01/02/1999 01/02/99
3 02/03/0001 01/02/03
4 01/02/0099 99/01/02
5 01/02/0003 03/01/02
6 / / fox 5 set cent 19 roll 50
7 01/02/1999 01/02/99
8 02/03/0001 01/02/03
9 01/02/0099 99/01/02
10 01/02/0003 03/01/02
11 / / fox 5 set date ymd
12 / / 01/02/99
13 02/03/0001 01/02/03
14 01/02/0099 99/01/02
15 01/02/0003 03/01/02
16 / / fox 6 defaults
17 01/02/0099 01/02/99
18 01/02/0003 01/02/03
19 / / 99/01/02
20 03/01/0002 03/01/02
21 / / fox 6 set cent 19 roll 50
22 01/02/0099 01/02/99
23 01/02/0003 01/02/03
24 / / 99/01/02
25 03/01/0002 03/01/02
26 / / set date ymd
27 01/02/0099 01/02/99
28 01/02/0003 01/02/03
29 01/02/1999 99/01/02
30 03/01/0002 03/01/02
31 / / foxpro 2.6 with y2kfox
32 01/02/1999 01/02/99
33 01/02/2003 01/02/03
34 / / 99/01/02
35 03/01/2002 03/01/02
36 / / set date ymd
37 / / 01/02/99
38 02/03/2001 01/02/03
39 01/02/1999 99/01/02
40 01/02/2003 03/01/02
Dates in format yyyymmdd worked fine.
Does anyone have any ideas or suggestions about how to handle this behavior short of brute force coding?
Thanks,
--Dave
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only