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

11/30/2022

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