Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cmonth
Message
From
23/06/1999 16:27:59
 
 
To
23/06/1999 16:22:31
Dovi Gilberd
Dovtware Consulting Inc
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Cmonth
Miscellaneous
Thread ID:
00233028
Message ID:
00233181
Views:
31
>fred thank you...this is the cituation
>a harris pbx thows information into my database..
>my field is a character field
>and it comes like this 990501
>i used substr(view2.answertime,1,2) + ":" + substr(view2.answertime,3,2) to format it into 05/01/99 still in characters...
>the question is how do i formate it into May-05-99 instead.....

You still need to get it into a date variable, even if only temporarily, to get the month. Then you can build a new character variable in the format you want.

dVar = CTOD(SUBSTR(x,3,2)+'/'+SUBSTR(x,5,2)+'/'+SUBSTR(x,1,2))
YourNewString = CMONTH(dVar)+'-'+SUBSTR(x,5,2)+'-'+SUBSTR(x,1,2)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform