Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Month function not working...

Status
Not open for further replies.

alsaunde

Programmer
Dec 7, 2001
6
CA
Ok, I really hope this is a silly question, because I have been going nuts trying to figure it out.

I am developing a website on my own computer, Win2k Pro. It is interpreting dates as mm/dd/yyyy. I upload the code to the live site(win2k server) and suddenly it is dd/mm/yyyy.

So on my computer Month("7/1/2002") gives me "7", on the live server Month("7/1/2002") gives me "1".

Any thoughts on what I am doing wrong?

Thanks,

Al
 
Interesting problem. You probably are doing everything right. Here is a a pertinent quote from the MSDN Scripting reference for VBScript which may illuminate the problem.

You will find this under the function DateValue(date)

If date is a string that includes only numbers separated by valid date separators, DateValue recognizes the order for month, day, and year according to the short date format you specified for your system.

Perhaps the live server is set to use European style dates?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top