Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Character to Date Time Function
Message
 
À
31/01/2005 15:11:59
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00982397
Message ID:
00982426
Vues:
37
>? CTOT("20050131120100")
>
>Returns a blank DateTime value


try:
TimeStr = "20050131120100"
DATETIME(VAL(LEFT(TimeStr,4)),;
         VAL(SUBSTR(TimeStr,5,2)),;
         VAL(SUBSTR(TimeStr,7,2)),;
         VAL(SUBSTR(TimeStr,9,2)),;
         VAL(SUBSTR(TimeStr,11,2)),;
         VAL(RIGHT(TimeStr,2)))
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform