Out of the database when i get a date field it is coming out in the following format:
Dec 19 2012 12:00AM
what i would like is
19/12/12
I use to have a function like the following, but since the database got changed it doesn’t work…
function ReformatDate(val)
if len(val) = 8 then
ReformatDate = right(val, 2) & "/" & mid(val, 5, 2) & "/" & left(val, 4)
else
ReformatDate = val
end if
end function
im assuming it isnt going into the if because the length is not 8 characters any more.
Use your sgbd’s functions to format the dates. For example, in MySQL, you have
DATE_FORMAT()to do such things.