Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Time in a textbox
Message
De
15/08/2001 10:16:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
15/08/2001 09:43:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00544028
Message ID:
00544068
Vues:
15
>>>I've got a very basic question whose answer is escaping me.... Can I set the default value of a textbox to accept time? Something like 07:30 or 15:00 similar to setting date by placing {} in the value?
>>
>>I thought time was displayed as character data. You could just set the textbox's inputmask = 99:99 Good luck,
>>John
>
>Thanks John,
>
>That's what I did (input mask.) Thought there might be a different way.

Since working with DateTime values is somewhat awkward (you save the date together with a time), it is convenient to create your own set of functions to add, subtract, etc., time values (stored as texts).

Some functions you will need are the mod() function (equivalent to % operator), and int().

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform