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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A weird problem with dates.

Status
Not open for further replies.

jerry13

Programmer
Jun 19, 2001
4
CA
How do I make Windows 2000 Server always give the same output for this line of code from an asp page:
Response.Write "date = "& date()
I have two servers both with the same "Regional Settings" and yet they output two different date formats. One gives 19/06/2001 and the other gives 6/19/2001. How do I make them both say 6/19/2001?

 
should be in your codeing...

FormatDateTime(Date, 1) will produce
Tuesday, June 19, 2001

FormatDateTime(Date, 2) will produce
6/19/2001

And

date() Will produce
6/19/2001


==============================

That's as far as I know. sorry if I didn't help.

-Ovatvvon

 
Try this
MyDate = Format(Date, "mm/dd/yyyy")
or
MyDate = Format(Date, "dd/mm/yyyy")
or
MyDate = Format(Date, "mm/dd/yy")
or ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top