473,378 Members | 1,512 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,378 software developers and data experts.

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

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
1 1858
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Shlomi Schwartz | last post by:
Hi all, Why do I get the folowing date when creating it like so: var d = new Date(2003,9,2); Wed Oct 1 23:00:00 UTC+0200 2003 Isent it soposed to be:
7
by: Thomas R. Hummel | last post by:
Hello all, I am trying to write a query that compares a member's enrollment period with the products that their group has had during that period (all members belong to a group and the products...
6
by: Franz | last post by:
Hy all, I have a problem with a date in javascript on firefox Browser. I use this javascript method: var dataNow=new Date(); var dd=dataNow.getDate(); var mm=dataNow.getMonth()+1; var...
1
by: sylvian stone | last post by:
Hi, I've used standard date functions in the past, but need to create something a little different, as I am working on an investment calculator. What I need to do is validate two dates, and...
1
by: Scott Dunham | last post by:
I'm trying to select records between 2 different times, but I can't seem to get Access to see anything other than the date. For instance, criteria "Between #11/12/2001 1:45:00 PM# and #11/12/2001...
9
by: VJ | last post by:
I have a window were I display a bunch of Labels. A click event is attached for each label, when clicked it will display a edit box i.e textbox. If the enter key is pressed in the textbox I want to...
6
by: alexanderpope11 | last post by:
Hello, how do I write this SQL: I would like to check the Main table for invalid rows. An invalid row is: any row where the Start_date to stop_date range overlaps an invalid date in the Code...
3
by: Bob Sanderson | last post by:
I have a PHP web page which uses a HTML form. I would like to enter dates into the date fields using a JavaScript calendar, similar to the way phpMyAdmin does. Can anyone recommend a JavaScript...
0
by: Cyril044 | last post by:
Hey Guys! Im having a bit of a problem. Im using SQL server 2005 and in the table i have a date field but i used string instead of the datetime value. I want to generate a report where all the dates...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.