/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/20/2019

Date, Time, and Now Functions Results
Date() 7/20/2019
Time() 9:28:23 AM
Now() 7/20/2019 9:28:23 AM
formatDateTime(Date,0) 7/20/2019
formatDateTime(Date,1) Saturday, July 20, 2019
formatDateTime(Date,2) 7/20/2019
formatDateTime(Time,0) 9:28:23 AM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 9:28:23 AM
formatDateTime(Now,0) 7/20/2019 9:28:23 AM
formatDateTime(Now,1) Saturday, July 20, 2019
formatDateTime(Now,2) 7/20/2019
formatDateTime(Now,3) 9:28:23 AM
formatDateTime(Now,4) 09:28