Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dates
Message
From
15/10/1999 13:46:44
 
 
To
15/10/1999 13:46:12
Jorge Haro
Independent Consultant
Juarez, Mexico
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Dates
Miscellaneous
Thread ID:
00276974
Message ID:
00276991
Views:
24
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform