ถ้าเป็นผมจะเขียน function DateFormat เลย ที่ผมเขียนก็ประมาณนี้เลย
<%
Function DateFormat(Value,Format)
Format = Replace(Format,"YYYY",Year(Value))
Format = Replace(Format,"YY",Year(Value))
Format = Replace(Format,"MMMM",MonthName(Month(Value)))
Format = Replace(Format,"MMM",MonthName(Month(Value),True))
Format = Replace(Format,"MM",Right("00" & Month(Value),2))
Format = Replace(Format,"M",Month(Value))
Format = Replace(Format,"DDDD",WeekDayName(WeekDay(Value)))
Format = Replace(Format,"DDD",WeekDayName(WeekDay(Value),True))
Format = Replace(Format,"DD",Right("00" & Day(Value),2))
Format = Replace(Format,"D",Day(Value))
Format = Replace(Format,"HH",Right("00" & Hour(Value),2))
Format = Replace(Format,"hh",Right("00" & Hour(Value),2))
Format = Replace(Format,"H",Hour(Value))
Format = Replace(Format,"h",Hour(Value))
Format = Replace(Format,"mm",Right("00" & Hour(Value),2))
Format = Replace(Format,"m", Minute(Value))
Format = Replace(Format,"ss",Right("00" & Second(Value),2))
Format = Replace(Format,"s", Second(Value))
DateFormat = Format
End Function