/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

7/1/2025

Date, Time, and Now Functions Results
Date() 7/1/2025
Time() 4:53:22 PM
Now() 7/1/2025 4:53:22 PM
formatDateTime(Date,0) 7/1/2025
formatDateTime(Date,1) Tuesday, July 1, 2025
formatDateTime(Date,2) 7/1/2025
formatDateTime(Time,0) 4:53:22 PM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 4:53:22 PM
formatDateTime(Now,0) 7/1/2025 4:53:22 PM
formatDateTime(Now,1) Tuesday, July 1, 2025
formatDateTime(Now,2) 7/1/2025
formatDateTime(Now,3) 4:53:22 PM
formatDateTime(Now,4) 16:53