Friday, July 11, 2008

Convert the Date Format like : 30-May-2004

Function date_ddmonyyyy(vDate)

' return the date in the DD-MON-YYYY format, ex. 31-Aug-2004

If vDate = "" Then

vDate = Date()

End If
a = MonthName(Month(CDate(vDate)), true) b = Day(Date()) c = Year(Date())
If b<10 b="0">

End If
date_ddmonyyyy = b & "-" & a & "-" & c

End Function

No comments: