ASP - formatting date and time - Asked By asif hameed on 21-Jan-10 04:27 AM

Hi all,

I want to format and date using classic asp. I want date to be like this 20100122 and time like this 143423 (hourminutesecond). How can i do this in classic asp. Please help me.

Regards,

Asif Hameed

Study these - Rolf Jaeger replied to asif hameed on 22-Jan-10 02:39 AM

You might find these pointers helpful:

http://www.psacake.com/web/fr.asp

http://www.aspfree.com/c/a/ASP-Code/Format-DateTime-Function--fmtDateTime-by-Kevin-Turner/

Sorry, but I didn't have sufficient time to work out the specific functions for you,
Rolf

mv ark replied to asif hameed on 30-Jan-10 11:28 PM
Adapt this snippet -
<%
Response.Write "Today's date: " & Year(Now())  & Month(Now())  & Day(Now())
Response.Write "<BR>Time: " & Hour(Now()) &  Minute(Now()) & Second(Now())
%>