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!

ASP Date in Access 2K and IIS4

Status
Not open for further replies.

IndyGill

Technical User
Jan 15, 2001
191
GB
Im not to sure if im in the right forum for this one but here goes anyway. I have an IIS 4 Web server which has a Microsoft Database on it.

I have an ASP web page which inputs a date into the Database. When I input the date from my ASP page dd/mm/yy and then recall it from the Database the date has been converted to yy/mm/dd.

However if Access inputs a date into the database automatically it is fine. I have checked my ASP page several times and its OK. The whole thing works fine on my local machine which is running PWS

So I am guessing something is going wrong when data is passed inbetween my web page and the Access DB. I am running MDAC 2.6 as I thought it might be an ADO problem.

I have run out of ideas and I could really do with some help!!

Many thanks in advance

Indy
 
I'm assuming that you have the dates stored in yy/mm/dd format in your DB. what you have to do is format the date in the ASP page to be in the same format, i know this has something to do with setting your LCID, but i don't have enough experience with that to tell you what it is.

or you can do it the long hand way:

dim mydate
mydate = year(date) & "/" & month(date) & "/" & day(date)

then use mydate in your sql string

hth
leo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top