Home All Groups Group Topic Archive Search About

Simple mask Edit for Hours:Minutes

Author
20 Jan 2006 2:56 PM
Bill nguyen
I would like to be able to force "HH:MM" format for a text field to show
hours and minutes in military format. User can enter 130 or 0130 and the
text would display "01:30"

Any suggestion is greatly appreciated.

Bill

Author
20 Jan 2006 4:07 PM
Cor Ligthert [MVP]
Bill,

>I would like to be able to force "HH:MM" format for a text field to show
>hours and minutes in military format. User can enter 130 or 0130 and the
>text would display "01:30"
>

That is in all cultures beside where is the English language used standard.
(Only in the English Language it is called military format).

:-)

However, there is in the iformatprovider a special parameter for that HH:mm.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationdatetimeformatinfoclasstopic.asp

I hope this helps,

Cor
Author
20 Jan 2006 6:33 PM
Bill Nguyen
Cor;
this is very useful. Thanks so much.

However, the Time is a character column in the database and not part of the
date. Unless I can use DatePicker for both Date & Time, I still have to
format a text field into HH:mm format.

Thanks

Bill

Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:%23MfLOudHGHA.2628@TK2MSFTNGP15.phx.gbl...
> Bill,
>
>>I would like to be able to force "HH:MM" format for a text field to show
>>hours and minutes in military format. User can enter 130 or 0130 and the
>>text would display "01:30"
>>
>
> That is in all cultures beside where is the English language used
> standard. (Only in the English Language it is called military format).
>
> :-)
>
> However, there is in the iformatprovider a special parameter for that
> HH:mm.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationdatetimeformatinfoclasstopic.asp
>
> I hope this helps,
>
> Cor
>