/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

11/13/2019

Date, Time, and Now Functions Results
Date() 11/13/2019
Time() 3:15:56 PM
Now() 11/13/2019 3:15:56 PM
formatDateTime(Date,0) 11/13/2019
formatDateTime(Date,1) Wednesday, November 13, 2019
formatDateTime(Date,2) 11/13/2019
formatDateTime(Time,0) 3:15:56 PM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 3:15:56 PM
formatDateTime(Now,0) 11/13/2019 3:15:56 PM
formatDateTime(Now,1) Wednesday, November 13, 2019
formatDateTime(Now,2) 11/13/2019
formatDateTime(Now,3) 3:15:56 PM
formatDateTime(Now,4) 15:15