Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieve time from DateTime field ??
Message
De
24/09/1998 05:19:05
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
 
 
À
24/09/1998 05:14:11
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00140265
Message ID:
00140268
Vues:
33
>>Are there any functions to retrieve the time part of a DateTime field so that a data bound control can display only the time part and be modified by a user?
>>
>>We can't seem to find any such functions, so help is really appreciated...
>
>Hello again,
>
>I think you have to use the HOUR(), MINUTE() and SEC() functions, so you get something like
>
>? PADL(HOUR( DATETIME()), 2, "0") + ":" + PADL(MINUTE( DATETIME()), 2, "0") + ":" + PADL(SEC( DATETIME()), 2, "0")
>
>pretty horrible eh.

Or even just

? RIGHT( TTOC( DATETIME()), 8)

It depends upon how you want to process the time.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform