McKirahan wrote on 15 feb 2008 in microsoft.public.inetserver.asp.general:
<%
Response.Write rs("DT_EXAME") & " = " & MDY(rs("DT_EXAME"))
Function MDY(DT)
MDY = ""
If IsDate(DT) Then
MDY = Right(100+Day(DT),2) & "/" _
& Right(100+Month(DT),2) & "/" & Year(DT)
End If
End Function
%>
<%
response.write dateToString(#2008-02-15#, "dd/mm/yyyy") & "<br>"
response.write dateToString(#2008-02-16#, "m/d/yyyy")
function dateToString(d, frmt)
aF = split(frmt,"/")
for i=0 to 2
if aF(i) = "d" then aF(i) = day(d)
if aF(i) = "dd" then aF(i) = right("0"&day(d),2)
if aF(i) = "m" then aF(i) = month(d)
if aF(i) = "mm" then aF(i) = right("0"&month(d),2)
if aF(i) = "yyyy" then aF(i) = year(d)
next
dateToString= join(aF,"/")
end function
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)