|
box -> RE: <%=date%> (2/6/2008 2:41:57)
|
Thanks, it works great, the problem is if I use it as hidden value in the form I get syntax error!!![&:] <% function fixTheDate(dateIn) tempText = "" If IsDate(dateIn) Then If len(DatePart("d",dateIn)) = 1 Then tempText = tempText & "0" & DatePart("d",dateIn) & "/" Else tempText = tempText & DatePart("d",dateIn) & "/" End If If len(DatePart("m",dateIn)) = 1 Then tempText = tempText & "0" & DatePart("m",dateIn) & "/" Else tempText = tempText & DatePart("m",dateIn) & "/" End If fixTheDate = tempText & DatePart("yyyy",dateIn) else ' if not a date, send back an empty string fixTheDate = "" end if end function response.write(fixTheDate(Date())) %>
|
|
|
|