P
PW
<rant>
Sorry guys, but I just have to whinge. Dates in ASP are a total pain in the
butt! I seem to get caught out so many times. I realise its my own fault,
but going from the posts in this newsgroup and others, I'm not the only one.
Its just a poorly addressed issue within ASP. So for all your poor buggers
out there that are having problems, particularly with european date formats,
here is my solution.
I have the user enter their date in european format ("31-12-2004") and then
handle it this way ...
myDate = Request.QueryString("txtDate")
myArray = Split(myDate, "-")
myDD = myArray(0)
myMM = myArray(1)
myYYYY = myArray(2)
myISOdate = myYYYY & "-" & myMM & "-" & myDD
I find that ISO formatted dates typically go into the database of choice
pretty readily.
Hope this helps someone.
Cheers,
PW
</rant>
Sorry guys, but I just have to whinge. Dates in ASP are a total pain in the
butt! I seem to get caught out so many times. I realise its my own fault,
but going from the posts in this newsgroup and others, I'm not the only one.
Its just a poorly addressed issue within ASP. So for all your poor buggers
out there that are having problems, particularly with european date formats,
here is my solution.
I have the user enter their date in european format ("31-12-2004") and then
handle it this way ...
myDate = Request.QueryString("txtDate")
myArray = Split(myDate, "-")
myDD = myArray(0)
myMM = myArray(1)
myYYYY = myArray(2)
myISOdate = myYYYY & "-" & myMM & "-" & myDD
I find that ISO formatted dates typically go into the database of choice
pretty readily.
Hope this helps someone.
Cheers,
PW
</rant>