Enter date without slashes

Z

zSplash

I want to enter dates without slashes (i.e., 051907, or mmddyy), but am
unable to define an input mask for dates without slashes. Do I have to
identify the input mask as a string, and then take whatever the entry is and
convert it to a date, or what's the deal?

TIA.
 
G

Guest

Hi
Set the format on the form as
mmddyy

If the field in the table is formated as a date/time field the format on the
form will not affect what is stored just what you see (and input) on the form.

012507
will be stored as
25th Jan 2007

Hope this helps
 
J

Joseph Meehan

Wayne-I-M said:
Hi
Set the format on the form as
mmddyy

If the field in the table is formated as a date/time field the format
on the form will not affect what is stored just what you see (and
input) on the form.

012507
will be stored as
25th Jan 2007

Actually it will be stored as a number including a time. How it is
displayed in the table, query, report or form is dependent as Wayne
correctly noted by the format property.
 
Z

zSplash

Thanks, guys, for the help, but when I set the format of the underlying
field (in the table) to mmddyy, I get an error when I enter 051907 in the
field on the form. ("The value you entered isn't valid for this field. For
example, you may have entered text in a numeric field or a number that is
larger than the field size setting permits.)

I think it has something to do with the regional settings for short date
being set at mdyy, but I shouldn't be changing regional settings for
everyone who uses the database, should I? How can I get around that? (Or,
is my guess about regional settings not the problem?)

TIA
 
J

Joseph Meehan

zSplash said:
Thanks, guys, for the help, but when I set the format of the
underlying field (in the table) to mmddyy, I get an error when I
enter 051907 in the field on the form. ("The value you entered isn't
valid for this field. For example, you may have entered text in a
numeric field or a number that is larger than the field size setting
permits.)

I think it has something to do with the regional settings for short
date being set at mdyy, but I shouldn't be changing regional settings
for everyone who uses the database, should I? How can I get around
that? (Or, is my guess about regional settings not the problem?)

It should have nothing to do with regional settings. It should have
nothing to do with how you entered the data originally. Are you sure the
field is defined as a date-time type?
 
Z

zSplash

Thanks, John, for the help.

In the underlying table, the field is defined as date-time, and the format
is "mmddyy".
In the form based on the table, I look at the field properties and see
"mmddyy" as the format, yet when I view the form in Form View, and enter
"051907", I get the reported error.

If I enter "05/19/07", I don't get an error, but that's not what I want to
enter. I want to be able to enter the date without slashes.

TIA
 
Z

zSplash

I'm sorry, Joe. Thanks for your help so far.

What I want to do is enter dates with 6 digits, and not require slashes. Is
there any way to do this, if I define the field as a date field?

TIA
 
J

John Vinson

What I want to do is enter dates with 6 digits, and not require slashes. Is
there any way to do this, if I define the field as a date field?

Yes. Use an input mask of 00/00/00 and let Access put in the slashes
for you.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top