...

View Full Version : now() format



atferraz
10-23-2003, 02:47 AM
Hello
now() gives a mm/dd/yyyy format and I want a dd/mm/yyyy.

thanks anyone

glenngv
10-23-2003, 03:39 AM
function FormatDate(ByVal d)
'formats date to DD/MM/YYYY
dim mm,dd,yy
if not isdate(d) then exit function
mm = Month(d)
if mm<10 then mm="0"&mm
dd = Day(d)
if dd<10 then dd="0"&dd
yy = Year(d)
FormatDate = dd & "/" & mm & "/" & yy
end function

response.write "Now:" & FormatDate(Now()) & "<br>"
response.write "Christmas:" & FormatDate("12/25/2003") & "<br>"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum