Date / Time input mask (1 Viewer)

KenHigg

Registered User
Local time
Today, 12:57
Joined
Jun 9, 2004
Messages
13,327
I have a form where I want a date / time field to be formatted like:

08/08/2004 15:00

I do the input mask like:

99/99/0000\ 00:00;0;_

And the initial input is fine. But, having set the format to General date, the date field converts the date to:

8/8/2004 3:00:00 PM

after the cursor exits the field. Which may be acceptable, except that when the cursor re-enters the field to change the date / time, the input mask does not display the underscore characters which makes it hard for the end user to figure out how to enter the data.

See attached. Any suggestions?

ken
 

Attachments

  • Kenhigg.zip
    7.3 KB · Views: 724

Brianwarnock

Retired
Local time
Today, 17:57
Joined
Jun 2, 2003
Messages
12,701
You attachment did not contain a form only a table.
I used the wizard to create a form and the underscores appear but only when you start to type, is that what you were experiencing or did they not appear at all?

brian
 

BarryMK

4 strings are enough
Local time
Today, 17:57
Joined
Oct 15, 2002
Messages
1,350
Ken Probably not alot of help but in A97 the placeholders do appear and it displays this format on the form 01/01/2004 05:59:00. Hope the experts can sort this :(
 

KenHigg

Registered User
Local time
Today, 12:57
Joined
Jun 9, 2004
Messages
13,327
Sorry about not including the form...

Yes - The underscores (mask) appear only if there is no value present (a new entry). So if a user attempts to edit an existing date, it becomes confusing as to how they are supposed to enter the date / time...

Hope it makes sense...

With the example db, enter a date / time, leave the field, then tab back into the field and try to change the time... Not very intuitive...

???
ken
 

Brianwarnock

Retired
Local time
Today, 17:57
Joined
Jun 2, 2003
Messages
12,701
Yes I just tried a few things and i see the problem, to change the time you have to delete the time and just type eg 12:30, you cannot change a part of it. All the problems disappear if you use 99/99/0000\ 00:00:00;0;_ as the input mask, I think he adds hastily, and as it displays as this why not ask the inputter? to type two 0 and save the problems?

sorry if I'm not solving the real issue :)

brian
 

KenHigg

Registered User
Local time
Today, 12:57
Joined
Jun 9, 2004
Messages
13,327
Seems I had this before and elected to split the date and time into two fields. One issue here is that time is spoken in what we call military time; 3pm = 15:00. And I'd rather do a little more work/coding up front in order to keep the UI friendly...

Thanks for looking...

kh
 

Brianwarnock

Retired
Local time
Today, 17:57
Joined
Jun 2, 2003
Messages
12,701
Change your format in the table and the form to dd/mm/yyyy hh:nn

Brian
 

KenHigg

Registered User
Local time
Today, 12:57
Joined
Jun 9, 2004
Messages
13,327
Well I'll be darn. Thanks a million!!

kh
 

Brianwarnock

Retired
Local time
Today, 17:57
Joined
Jun 2, 2003
Messages
12,701
Pleased to help one who helps so many others.

Kicked myself when it worked :D

brian
 

Users who are viewing this thread

Top Bottom