Learn GREEK with Easy Online Lessons, Discussions
Click HERE for details...
/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

4/14/2021

Date, Time, and Now Functions Results
Date() 4/14/2021
Time() 7:40:01 AM
Now() 4/14/2021 7:40:01 AM
formatDateTime(Date,0) 4/14/2021
formatDateTime(Date,1) Wednesday, April 14, 2021
formatDateTime(Date,2) 4/14/2021
formatDateTime(Time,0) 7:40:01 AM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 7:40:01 AM
formatDateTime(Now,0) 4/14/2021 7:40:01 AM
formatDateTime(Now,1) Wednesday, April 14, 2021
formatDateTime(Now,2) 4/14/2021
formatDateTime(Now,3) 7:40:01 AM
formatDateTime(Now,4) 07:40