Dates & Times - Usage & Formatting by Darryl Fosbery - 7/15/2000
http://www.asp-help.com/articles/dates.asp
And to make a variable be in the format of mm/dd/yyyy (and the final
line of code can be modifed for other date formats), perhaps try
something like the following which you might even make into a function:
varFld = CDate(MyVariable)
intMonth = Month(varFld)
intDay = Day(varFld)
intYr = Year(varFld)
If intMonth < 10 Then
strMonth = "0" & CStr(intMonth)
Else
strMonth = CStr(intMonth)
End If
If intDay < 10 Then
strDay = "0" & CStr(intDay)
Else
strDay = CStr(intDay)
End If
strYr = Right(CStr(intYr), 4) ' And change the 4 to 2 for 2 year dates.
varFld = CStr(strMonth & "/" & strDay & "/" & strYr)
Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Devdex
http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!