I have an application written in classic ASP hosted in local.
This application is using a Microsoft Access Database.
My problem is with this request, I want all the data of the day:
`SELECT * FROM TABLE WHERE Date= #01/03/2020#`
I get the results like this:
do while not rs.EOF
response.write(" " & rs("Date"))
rs.movenext
loop
I'm only extracting the date right now and it's supposed to be the same as the date in the request.
However my results are 03/01/2020, 03/01/2020.
I do have a function to format my ouput:
function displayDate(dateToClean)
dateToShow = Right("0" & Day(dateToClean), 2) _
& "/" & Right("0" & Month(dateToClean), 2) _
& "/" & Year(dateToClean)
'If the date length is too small, it's null (0/0/0)
if (len(dateToShow) < 10) then
displayDate = ""
else
displayDate = dateToShow
end if
end function
I tried to change the date format in my database thanks to this doc:
https://support.office.com/en-us/article/format-a-date-and-time-field-47fbbdc1-52fa-416a-b8d5-ba24d881b698
But It didn't resolve my problem.
Hope I was understandable enough.