Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filename based on Datetime and Seconds
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01317041
Message ID:
01317088
Vues:
10
>You Tom,
>
>You can use SECONDS() function to get time up to miliseconds. See help for details.
>
>? TTOC(DATETIME(),1) + PADL(INT(SECONDS()*100 % 100), 2, "0")
>
>

True, but I want the seconds that was at the moment that the TTOC(datetime(),1) was captured at.....

mytime = datetime()

? ttoc(mytime,1) to print CCYYMMDDhhmmss

but how to get the seconds ss part from the mytime??

*****************

Will this work?
lcDateTime =  TTOC(DATETIME(),1)

lcDecimalSeconds =   LEFT(RIGHT(ALLTRIM(STR(SECONDS(),10,3)),3),2)

? lcDateTime + lcDecimalSeconds
The Decimal Seconds part will probable not be the same as what the datetime was captured at, but I guess for my purposes, which is to get a file name created WHEN the file was created, is good enough.

Thanks!
Tommy Tillman A+ NetWork+ MCP
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform