Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
APPEND FROM not Y2K ok.... know a fix?
Message
 
 
À
14/07/1999 14:28:37
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00241414
Message ID:
00242532
Vues:
22
>I found this out from a client today. If you use append from on an SDF file with a date in it... even if all 4 digits of the year are in the file FoxPro imports it to a date field using the first two characters of the year (century) as the year, and ALL dates have a 19 as century.
>
>Is there a way to make this work? I know there are other methods I can use, but I want to know if it is possible to make APPEND FROM work?
>
>Thanks,
>BOb

Bob,

What format are the dates in the SDF file stored in? I ran a couple of tests using FoxPro 2.6a for DOS and got the correct century APPEND'ing into a date field if the SDF date was stored as YYYYMMDD.

If the SDF file has dates in the format MM/DD/YY then Fox 2.x will still append it into a date field OK, but it will assume the 20th century (19xx). If the SDF file has dates in the format MM/DD/YYYY then the last two characters of YYYY are going to be ignored and the first two characters of YYYY will be treated as 19YY. So for SDF file dates in any format except YYYYMMDD, you've got to hadle them maually. One way is to append into a character field and then use code to convert the string to the correct date and store it to a date field.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform