Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dates
Message
De
15/10/1999 13:46:44
 
 
À
15/10/1999 13:46:12
Jorge Haro
Independent Consultant
Juarez, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Dates
Divers
Thread ID:
00276974
Message ID:
00276991
Vues:
23
>I guess I missed that detail,so yea just using CTOD(), and then DTOS(),.. he does want the final result to be a character string right?
>
>>>Doesn't DTOS()do that?
>>>
>>>>I assume that all years are to be in the 1900's.
>>>>
>>>>
SCAN
>>>>   lnAt = At("/", MyDate)
>>>>   lcMonth = Left(MyDate, lnAt - 1)
>>>>   lnAt2 = At("/", MyDate, 2)
>>>>   lcDay = SubStr(MyDate, lnAt + 1, lnAt2 - lnAt - 1)
>>>>   lcYear = Str(1900 + Val(Right(MyDate, Len(MyDate) - lnAt2)), 4)
>>>>   REPLACE MyDate WITH lcYear + "/" + lcMonth + "/" + lcDay
>>>>ENDSCAN
HTH
>I have a character field with a date stored in it in the following format
>>>>>
>>>>>mm/dd/yy
>>>>>
>>>>>I need to get this to be in this format ccyymmdd
>>
>>Yes, but that assumes you have a date field not a character field. Perhaps if you convert to date prior to doing any conversion ...

I believe so.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform