/home/web-programming/asp/

ASP Date, Time, and Now Functions

The ASP Date(), Time(), and Now() functions are used to return the date or time in various formats.

ASP Coding for Date Function

<%

Response.Write Date()

%>


OR

<%

=Date()

%>


Result

6/28/2026

Date, Time, and Now Functions Results
Date() 6/28/2026
Time() 4:30:54 PM
Now() 6/28/2026 4:30:54 PM
formatDateTime(Date,0) 6/28/2026
formatDateTime(Date,1) Sunday, June 28, 2026
formatDateTime(Date,2) 6/28/2026
formatDateTime(Time,0) 4:30:54 PM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 4:30:54 PM
formatDateTime(Now,0) 6/28/2026 4:30:54 PM
formatDateTime(Now,1) Sunday, June 28, 2026
formatDateTime(Now,2) 6/28/2026
formatDateTime(Now,3) 4:30:54 PM
formatDateTime(Now,4) 16:30