473,419 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Input Mask for dateformat dd/mm/yyyy hh\:nn

Dear all,

I have a datefield that sometimes should store hours and minutes too ans use
following format and inputmask.

dd/mm/yyyy hh\:nn

09/09/0000\ 99:99;0;*

Typing date, hour and minutes is OK.
But i would like to be able to stop after the date-part like 12122005 and
enterkey giving 12/12/2005 00:00
But this triggers an error 'The value you entered isn't valid for this field
'

Is it possible to create a inputmask that accepts skipping the hour and
minutes ?

thanks,

Filip
Dec 17 '05 #1
16 12653
Simple answer - input masks are evil. Don't use input masks.

On Sat, 17 Dec 2005 10:26:26 GMT, "Filips Benoit" <be***********@pandora.be>
wrote:
Dear all,

I have a datefield that sometimes should store hours and minutes too ans use
following format and inputmask.

dd/mm/yyyy hh\:nn

09/09/0000\ 99:99;0;*

Typing date, hour and minutes is OK.
But i would like to be able to stop after the date-part like 12122005 and
enterkey giving 12/12/2005 00:00
But this triggers an error 'The value you entered isn't valid for this field
'

Is it possible to create a inputmask that accepts skipping the hour and
minutes ?

thanks,

Filip


Dec 17 '05 #2
If I don't use an input mask I can enter:

2005-12-17

or I can enter

2005-12-17 09:00

Dec 17 '05 #3
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:

inputmask > you have to type 4 zero's extra at the end

I still prefere an inputmask since it shows clearly what type of date should
be input
And trapping inputmask-error can give a clear errormessage !

Filip
"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
If I don't use an input mask I can enter:

2005-12-17

or I can enter

2005-12-17 09:00

Dec 17 '05 #4
Filips Benoit wrote:
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:

inputmask > you have to type 4 zero's extra at the end

I still prefere an inputmask since it shows clearly what type of date
should be input
And trapping inputmask-error can give a clear errormessage !


And when I enter my name into a database I have to type 11 characters.

I have never understood why DateTimes are singularly expected to have some sort
of shortcut for entering them. No one would advocate a shortcut for entering
credit card numbers or social security numbers, but users always wants to
complain about how many keystrokes it takes to enter a date.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Dec 17 '05 #5

"Filips Benoit" <be***********@pandora.be> schreef in bericht news:BK*********************@phobos.telenet-ops.be...
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:

inputmask > you have to type 4 zero's extra at the end


FWIW:
If I use a format property like dd-mm-yyyy hh:mm (The Netherlands here...)
and if I don't use an inputmask ...

if I enter something like 4/2 (3 chars only), the result in my textbox is 04-02-2005 0:00
if I enter something like 14/2 (4 chars only), the result in my textbox is 14-02-2005 0:00
if I enter something like 14/12 (5 chars only), the result in my textbox is 14-12-2005 0:00

Arno R

Dec 17 '05 #6
You start convincing me not using a inputmask !!

Thanks

"Arno R" <ar***********@tiscali.nl> wrote in message
news:43***********************@text.nova.planet.nl ...

"Filips Benoit" <be***********@pandora.be> schreef in bericht
news:BK*********************@phobos.telenet-ops.be...
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:

inputmask > you have to type 4 zero's extra at the end


FWIW:
If I use a format property like dd-mm-yyyy hh:mm (The Netherlands here...)
and if I don't use an inputmask ...

if I enter something like 4/2 (3 chars only), the result in my textbox
is 04-02-2005 0:00
if I enter something like 14/2 (4 chars only), the result in my textbox
is 14-02-2005 0:00
if I enter something like 14/12 (5 chars only), the result in my textbox
is 14-12-2005 0:00

Arno R
Dec 17 '05 #7
Steve Jorgensen <no****@nospam.nospam> wrote in
news:mt********************************@4ax.com:
Simple answer - input masks are evil. Don't use input masks.


Date masks are not infinitely flexible, so they can't do everything.
But where they are sufficient, they save a lot of coding.

I'd say that you should use them where they work and not use them
where they don't.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 17 '05 #8
On Sat, 17 Dec 2005 15:24:29 -0600, "David W. Fenton"
<XX*******@dfenton.com.invalid> wrote:
Steve Jorgensen <no****@nospam.nospam> wrote in
news:mt********************************@4ax.com :
Simple answer - input masks are evil. Don't use input masks.


Date masks are not infinitely flexible, so they can't do everything.
But where they are sufficient, they save a lot of coding.

I'd say that you should use them where they work and not use them
where they don't.


Controls with input masks don't act the asme as controls anywhere else, and
that's true for dates as well. It's too easy to click on a character and
start typing in the middle, it's too hard to copy and paste, and it's too hard
to edit in the middle of a value. Besides, I prefer to be lazy and type
something like Aug 1, 2005 rather than remember the month number for Aug or
wonder what month/day order interpretation will be employed.

In my day job, I work on a shrink wrapped Access application that I didn't
write. When I suggested to the sales manager that I should take the input
masks off all the dates, he emphatically agreed since they had been
specifically annoying to him during training sessions. After I removed them,
one of our data entry people specifically came over to thank me for doing so.
Dec 17 '05 #9
Steve, finaly i did remove the inputmask too !!

Filip
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:pm********************************@4ax.com...
On Sat, 17 Dec 2005 15:24:29 -0600, "David W. Fenton"
<XX*******@dfenton.com.invalid> wrote:
Steve Jorgensen <no****@nospam.nospam> wrote in
news:mt********************************@4ax.com :
Simple answer - input masks are evil. Don't use input masks.
Date masks are not infinitely flexible, so they can't do everything.
But where they are sufficient, they save a lot of coding.

I'd say that you should use them where they work and not use them
where they don't.


Controls with input masks don't act the asme as controls anywhere else,

and that's true for dates as well. It's too easy to click on a character and
start typing in the middle, it's too hard to copy and paste, and it's too hard to edit in the middle of a value. Besides, I prefer to be lazy and type
something like Aug 1, 2005 rather than remember the month number for Aug or wonder what month/day order interpretation will be employed.

In my day job, I work on a shrink wrapped Access application that I didn't
write. When I suggested to the sales manager that I should take the input
masks off all the dates, he emphatically agreed since they had been
specifically annoying to him during training sessions. After I removed them, one of our data entry people specifically came over to thank me for doing

so.
Dec 18 '05 #10
Steve Jorgensen <no****@nospam.nospam> wrote in
news:pm********************************@4ax.com:
On Sat, 17 Dec 2005 15:24:29 -0600, "David W. Fenton"
<XX*******@dfenton.com.invalid> wrote:
Steve Jorgensen <no****@nospam.nospam> wrote in
news:mt********************************@4ax.co m:
Simple answer - input masks are evil. Don't use input masks.
Date masks are not infinitely flexible, so they can't do
everything. But where they are sufficient, they save a lot of
coding.

I'd say that you should use them where they work and not use them
where they don't.


Controls with input masks don't act the asme as controls anywhere
else, and that's true for dates as well. It's too easy to click
on a character and start typing in the middle, . . .


People doing data entry shouldn't be clicking on the control -- they
should be tabbing into it.
. . . it's too hard to copy and paste, . . .
I've never run onto that problem, nor heard it as a complaint from
any users.
. . . and it's too hard
to edit in the middle of a value. . . .
Too hard for whom? Those who are incompetent with the keyboard?
. . . Besides, I prefer to be lazy and type
something like Aug 1, 2005 rather than remember the month number
for Aug or wonder what month/day order interpretation will be
employed.
Well, that's fine if that's what you want to do.

But date masks work perfectly well where they are appropriate. And
users get used to the way they work.
In my day job, I work on a shrink wrapped Access application that
I didn't write. When I suggested to the sales manager that I
should take the input masks off all the dates, he emphatically
agreed since they had been specifically annoying to him during
training sessions. After I removed them, one of our data entry
people specifically came over to thank me for doing so.


Well, one makes design decisions appropriate for the targets of an
app. That does not automatically mean that one should always avoid
data masks in all cases.

It's one of many techniques available for accomplishing a task.
Where it works, use it. Where it doesn't, don't.

Which is where I came in on this discussion. . .

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 19 '05 #11
On Sun, 18 Dec 2005 18:44:50 -0600, "David W. Fenton"
<XX*******@dfenton.com.invalid> wrote:
Steve Jorgensen <no****@nospam.nospam> wrote in
news:pm********************************@4ax.com :
On Sat, 17 Dec 2005 15:24:29 -0600, "David W. Fenton"
<XX*******@dfenton.com.invalid> wrote:
Steve Jorgensen <no****@nospam.nospam> wrote in
news:mt********************************@4ax.com :

Simple answer - input masks are evil. Don't use input masks.

Date masks are not infinitely flexible, so they can't do
everything. But where they are sufficient, they save a lot of
coding.

I'd say that you should use them where they work and not use them
where they don't.


Controls with input masks don't act the asme as controls anywhere
else, and that's true for dates as well. It's too easy to click
on a character and start typing in the middle, . . .


People doing data entry shouldn't be clicking on the control -- they
should be tabbing into it.


I'm sure they usually do, but data entry is not always linear, especially when
double-checking.
. . . it's too hard to copy and paste, . . .


I've never run onto that problem, nor heard it as a complaint from
any users.


I find it annoying myself, and so does our sales manager who demos the program
to prospective customers.
. . . and it's too hard
to edit in the middle of a value. . . .


Too hard for whom? Those who are incompetent with the keyboard?


No - those who have habits based on how fields work that don't mix immutable
and mutable components - people like me.
. . . Besides, I prefer to be lazy and type
something like Aug 1, 2005 rather than remember the month number
for Aug or wonder what month/day order interpretation will be
employed.


Well, that's fine if that's what you want to do.

But date masks work perfectly well where they are appropriate. And
users get used to the way they work.


That sounds plausible, but the data entry person who thanked me for removing
it has entered 1000 of records into the system.
In my day job, I work on a shrink wrapped Access application that
I didn't write. When I suggested to the sales manager that I
should take the input masks off all the dates, he emphatically
agreed since they had been specifically annoying to him during
training sessions. After I removed them, one of our data entry
people specifically came over to thank me for doing so.


Well, one makes design decisions appropriate for the targets of an
app. That does not automatically mean that one should always avoid
data masks in all cases.

It's one of many techniques available for accomplishing a task.
Where it works, use it. Where it doesn't, don't.

Which is where I came in on this discussion. . .


When I started learning Access, I used input masks a lot. Over time, I used
them less and less. My current opinion is that they always have more problems
than benefits. If data entry help should be provided for a date field, I use
a calendar-style date picker.
Dec 19 '05 #12
David W. Fenton wrote:
People doing data entry shouldn't be clicking on the control -- they
should be tabbing into it.


I'd agree, however, when a data entry preson realizes s/he's made a
mistake, the mouse is often used to go back to the offending control. I
run a work control call centre and my people do a lot of data entry...
tabbing is definitely the way to go, but there's lots of scope for
poking around with the mouse.

FWIW, my date controls always have an after update event which does a
lot of checking, in order to minimize key strokes (plus there's a button
which opens a calendar form). It doe involve a bit of code, but once it
was done, it's done. I've used more or less the same code since about 1999.

To include time, I'd prefer a separate, even two separate controls.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Dec 19 '05 #13
Filips Benoit wrote:
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:


Use two or more separate controls. Combine the result in the on update
event of the record...

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Dec 19 '05 #14
Tim Marshall <TI****@PurplePandaChasers.Moertherium> wrote in
news:do**********@coranto.ucs.mun.ca:
David W. Fenton wrote:
People doing data entry shouldn't be clicking on the control --
they should be tabbing into it.
I'd agree, however, when a data entry preson realizes s/he's made
a mistake, the mouse is often used to go back to the offending
control. I run a work control call centre and my people do a lot
of data entry... tabbing is definitely the way to go, but there's
lots of scope for poking around with the mouse.


What about a keyboard shortcut for the date fields? Then the
individual who uses the keyboard for data entry could navigate to
those fields without needing to go to the mouse.
FWIW, my date controls always have an after update event which
does a lot of checking, in order to minimize key strokes (plus
there's a button which opens a calendar form). It doe involve a
bit of code, but once it was done, it's done. I've used more or
less the same code since about 1999.

To include time, I'd prefer a separate, even two separate
controls.


Go back and read the thread. I *said* that one could get around the
shortcomings of input masks by writing code, but that for what they
did and the amount of code they eliminated, input masks are useful.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 19 '05 #15
Tim Marshall <TI****@PurplePandaChasers.Moertherium> wrote in
news:do**********@coranto.ucs.mun.ca:
Filips Benoit wrote:
OK, but

no inputmask > you have to type 4 extra chars: 2 - 1 space and 1:


Use two or more separate controls. Combine the result in the on
update event of the record...


That adds code that isn't necessary with the input mask.

I'm not arguing that input masks are perfect or that it's a mistake
to code something more complex. I'm just saying that input masks
have their place. If they work for your particular situation, use
them. If they don't, do something else.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 19 '05 #16
David W. Fenton wrote:
Go back and read the thread. I *said* that one could get around the
shortcomings of input masks by writing code, but that for what they
did and the amount of code they eliminated, input masks are useful.


And I agree with your points. I was just commenting on the necessity of
sometimes going back to the keyed fields on a form even where tabbing is
carefully designed. I find my users totally ignore any keyboard short
cuts I include. 8(

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Dec 19 '05 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: J P Singh | last post by:
Hi All I am trying to query a database with a combination of surname and date of birth but it is giving me wrong results in certain conditions. It is the mm/dd/yyyy and dd/mm/yyyy stuff that...
3
by: williamc | last post by:
Somebody asked me if it would be possible to add auto-advance to a web form where there are a lot of repetitive 5 character fields. I took a look around the web and found a script, which appears to...
4
by: Roger Withnell | last post by:
I want to validate the data entered into a form text field by calling a function with onblur, doing the validation and, if the input is invalid, giving an alert to the user and returning focus and...
15
by: 50295 | last post by:
Hi everyone, This one is better experienced than explained, so I'm including a code sample below. Please and save (as an html file) and view with NN or Firefox (or maybe even Mozilla), and then...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
2
by: martinadhie | last post by:
Hi Guys, This is regular expression for validating dd-MMM-yyyy date format: ^(0|||3)-(|||||||||||)-(19|20)\d\d$ It will not allow case like 0-Aug-2007, should be 01-Aug-2007 Thanks,...
2
by: rajeevs | last post by:
Hi I would like to request your great help for completeing my database to have an input mask for a field in form as dd-mmm-yy hh:nn That is Medium date space space and short time Any help...
4
by: neelsfer | last post by:
I first deducted the laptime and actualstarttime of a race in a query using this formula and it gives me a correct lap1time value Lap1Time:nz(Format(-,"hh:nn:ss")) = 00:51:54 if i repeat this...
7
by: neelsfer | last post by:
The following code does not ignore the empty field values.It provides the correct values when the fields do contain a time value (ie 10:20:35) TotalTime3:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.