Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time in a textbox
Message
From
15/08/2001 10:16:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
15/08/2001 09:43:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00544028
Message ID:
00544068
Views:
24
>>>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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform