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

10/4/2022

Date, Time, and Now Functions Results
Date() 10/4/2022
Time() 12:41:29 AM
Now() 10/4/2022 12:41:29 AM
formatDateTime(Date,0) 10/4/2022
formatDateTime(Date,1) Tuesday, October 4, 2022
formatDateTime(Date,2) 10/4/2022
formatDateTime(Time,0) 12:41:29 AM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 12:41:29 AM
formatDateTime(Now,0) 10/4/2022 12:41:29 AM
formatDateTime(Now,1) Tuesday, October 4, 2022
formatDateTime(Now,2) 10/4/2022
formatDateTime(Now,3) 12:41:29 AM
formatDateTime(Now,4) 00:41