By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Enter date as 12/01 and display it back as 12/2001 problem

P: n/a
Hi All,
In access97 I have an unbound textbox with the format property set to
'short date' and an input mask of 99/99. In the after update event of
the textbox I have code; me!textbox = format(me!textbox, "mm/yyyy")

What I'm tring to do is let the user enter the month and two(2) digit
year and then display it back to them as a four(4) digit year. This
works fine up until 2001 then it screws up.
examples:
if I enter 11/99 it displays 11/1999
if I enter 10/80 it displays 10/1980
if I enter 11/00 it displays 11/2000

if I enter 11/01 it displays 11/2003?
if I enter 11/02 it displays 11/2003?

why?
thanks
bobh.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
11/01 is interpreted as November 1 of the current year.

11/99 cannot be November 99 of the current year, so Access takes another
interpretation.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob Hynes" <vu******@usexpress.net> wrote in message
news:39**************************@posting.google.c om...
Hi All,
In access97 I have an unbound textbox with the format property set to
'short date' and an input mask of 99/99. In the after update event of
the textbox I have code; me!textbox = format(me!textbox, "mm/yyyy")

What I'm tring to do is let the user enter the month and two(2) digit
year and then display it back to them as a four(4) digit year. This
works fine up until 2001 then it screws up.
examples:
if I enter 11/99 it displays 11/1999
if I enter 10/80 it displays 10/1980
if I enter 11/00 it displays 11/2000

if I enter 11/01 it displays 11/2003?
if I enter 11/02 it displays 11/2003?

why?
thanks
bobh.

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.