Convert dd/mm/yyyy to mm/dd/yyyy

<%

'SAMPLE INPUT DATE:31/12/2009

'SAMPLE OUTPUT DATE: 12/31/2009

'Convert dd/mm/yyyy to mm/dd/yyyy

function mmddyy(this_date)

dim dd_this_date,mm_this_date,yy_this_date

if this_date="" then

mmddyy=""

elseif not isDate(this_date) then

mmddyy=this_date

else

date_array=split(this_date,"/")

dd_this_date=date_array(0)

if dd_this_date <10 then

dd_this_date="0" & cint(dd_this_date)

end if

mm_this_date=date_array(1)

if mm_this_date <10 then

mm_this_date="0" & cint(mm_this_date)

end if

yy_this_date=date_array(2)

mmddyy=mm_this_date & "/" & dd_this_date & "/"
& yy_this_date

end if

end function

%>