Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Character to Date Time Function
Message
 
To
31/01/2005 15:11:59
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00982397
Message ID:
00982426
Views:
33
>? 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.
Previous
Reply
Map
View

Click here to load this message in the networking platform