The FormatMediumDate function returns mm/dd/yyyy, unlike (FormatDateTime(Now(),2) which only returns mm/dd/yy.
Syntax: mediumdate = FormatMediumDate(datevar) Example Usage:
<% = FormatMediumDate(rs("date")) %>ASP Source Code:
<% Function FormatMediumDate(DateValue) Dim strYYYY Dim strMM Dim strDD strYYYY = CStr(DatePart("yyyy", DateValue)) strMM = CStr(DatePart("m", DateValue)) If Len(strMM) = 1 Then strMM = "0" & strMM strDD = CStr(DatePart("d", DateValue)) If Len(strDD) = 1 Then strDD = "0" & strDD FormatMediumDate = strMM & "/" & strDD & "/" & strYYYY End Function %>Result