format date time in classic asp

HomEmicsloold

New Member
Out of the database when i get a date field it is coming out in the following format:\[code\]Dec 19 2012 12:00AM \[/code\]what i would like is \[code\]19/12/12\[/code\]I use to have a function like the following, but since the database got changed it doesn't work...\[code\] 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\[/code\]im assuming it isnt going into the if because the length is not 8 characters any more.
 
Back
Top