Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date to Character
Message
 
 
To
01/02/2005 11:14:49
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00982687
Message ID:
00982705
Views:
18
Be sure that your "set date to" settings match your date format and use cmonth() to return the month as a word. you can then trim this to just the first 3 characters.

the other parts can be returned with day() and year() and turned into strings with str()

I am assuming that your date is stored as a date for these functions, if not you'll need to use ctod() on your date as a string to get it as a date format.

so this gets your strings for the current day:

str1 = left(cmonth(date()),3)
str2 = alltrim(str(day(date())))
str3 = alltrim(str(year(date())))

hope that helps.

Ken.
Previous
Reply
Map
View

Click here to load this message in the networking platform