Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date to Character
Message
 
 
À
01/02/2005 11:14:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows 98
Database:
Visual FoxPro
Divers
Thread ID:
00982687
Message ID:
00982705
Vues:
17
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform