Savvas Tsitouridis wrote on 03 jul 2007 in
microsoft.public.inetserver.asp.general:
I have an Access database with a date field
The format that we store values is dd/mm/yyyy (greek)
NOT true, a date field is filled with an access internal numeric
representation of the date/time, so unformatted, and even comes out
unformatted.
I suppose you access that database using the jet engine under ASP-
vbscript?
The problem is that i can't retreive the correct dates because the
queries return only the english format dates.
[You perhaps mean the American one, mm/dd/yyyy, English is like yoursx
and ours]
No they do not, they are converted to the numeric representation of the
computer language you use [vbscript?]
Only if you use [the lazy way]
response.write myDate
there is an automatic conversion to the format
your own server's reginal settings provides.
Try:
<% ' vbscript
myDate = mDATA("dateField") 'or whatever your field is named
response.write myFormDate(myDate)
function myFormDate(x)
myFormDate = two(day(x)) & "/" & two(month(x)) & "/" & year(x)
end function
function two(x)
two = right("0" & x,2)
end function
%>
How to format the query to english date format (mm/dd/yyyy)?
See above.
A query does not format!
"to English"?, I do not think that is what you ment.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)