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

3/30/2023

Date, Time, and Now Functions Results
Date() 3/30/2023
Time() 5:48:56 PM
Now() 3/30/2023 5:48:56 PM
formatDateTime(Date,0) 3/30/2023
formatDateTime(Date,1) Thursday, March 30, 2023
formatDateTime(Date,2) 3/30/2023
formatDateTime(Time,0) 5:48:56 PM
formatDateTime(Time,2) 12/30/1899
formatDateTime(Time,3) 5:48:56 PM
formatDateTime(Now,0) 3/30/2023 5:48:56 PM
formatDateTime(Now,1) Thursday, March 30, 2023
formatDateTime(Now,2) 3/30/2023
formatDateTime(Now,3) 5:48:56 PM
formatDateTime(Now,4) 17:48