PDA

View Full Version : Date FORMAT as DD-MMM-YYYY


bullsb
04-14-2009, 06:18 PM
Hi,

This will look silly to many...however i am struck.

My system/server has the date format as mm/dd/yyyy and I require DD-MMM-YYYY i.e. 13-APR-2009

Old Pedant
04-14-2009, 09:58 PM
<%
Function DDMMMYYYY( dt )
If Not IsDate(dt) Then dt = Date() ' use today if no date given
DDMMMYYYY = Right("0" & Day(dt),2) & "-" _
& MonthName(Month(dt),True) & "-" _
& Year(dt)
End Function
%>