/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

3/29/2017

Date, Time, and Now Functions Results
Date() 3/29/2017
Time() 2:06:46 AM
Now() 3/29/2017 2:06:46 AM
formatDateTime(Date,0) 3/29/2017
formatDateTime(Date,1) Wednesday, March 29, 2017
formatDateTime(Date,2) 3/29/2017
formatDateTime(Time,0) 2:06:46 AM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 2:06:46 AM
formatDateTime(Now,0) 3/29/2017 2:06:46 AM
formatDateTime(Now,1) Wednesday, March 29, 2017
formatDateTime(Now,2) 3/29/2017
formatDateTime(Now,3) 2:06:46 AM
formatDateTime(Now,4) 02:06