We help IT Professionals succeed at work.
Get Started

Microsoft access, Dates, VB and weirdness

Last Modified: 2012-05-12
I have a script that takes a date variable which is passed through a browser string, and saves that date to a field in an access database. Its all done in old ASP (VB Script) and th 2 lines that do the job are :
billdue = Request.Querystring("billdue") - to take in the string

Rs("billdue") = billdue - to save to the database.

This script has run on a windows 98 webserver for a very long time, with no problems, but in the interest of retiring the machine, I've created an XP VM in Hyper V, and stuck this databse and script on there. So far so good.This was done mid december.

I've just noticed that since the start of this year, the date field has been written in the wrong format. Its now started writing in MDY instead of DMY, and for the life of me I cant work out why. It appears to only do it until it gets to the 12th day of the month (as I've tested by changing dates), at which point it realises there arnt any more months after that and writes it in DMY again.

This database holds over 5k+ records all with at least 6 date fields, and a number of calculations are made from it.

Any idea's on how I can get the machine to write in the write date format before the 12th day of the month?

I've checked and changed the regional settings, but if you change them, the previous records come out the wrong way round.

I'm stuck, as all my other scripts that calculate off date fields are going to go weird.
Watch Question
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE