Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Year 2018 to 1918 Date Math
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00995917
Message ID:
00995925
Vues:
25
It's easy to convet DOB's that are in the future. For example, w/o additional info you cannot tell if DOB year 2004 is 1904 in fact. You can adjust ldRolloverDate if you know the latest DOB in data.
ldRolloverDate = date()
update LOSIMPORT set dob= GOMONTH(dob, - 100*12) ;
  where dob > ldRolloverDate
>I just import a text file into a dbf, the text file contained Date of Birth fields, but only with two digit years. Whent the text field was converted to a date field, it put some dates out of wack with reality, for instance a dob that had 18 for the year, was converted to 2018. I'm trying to figure out a way to replace the DOB year portion with the correct value.
>
>Something like:
>
>update LOSIMPORT set dob=dob-100 years
>
>
>I can't just subtract (100*365), because that just doesn't calulate the right number of days, I was wondering if someone knew a way to do this.
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform