WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE
The Date function returns the current system date. The ASP function
called Date is very simple - it returns back to you the current system
date. You simply call the Date() function and voila, you know
the date that your system clock has for you. Date function does not
include time. The ASP Date function has to be one of the easiest date
retrieval methods of all time. To display the date on your page all
you need to do is place the Date function as the response.
The Syntax of date function is :-
Interval can be any one of the following values (in quotes) :-
Setting |
Description |
yyyy |
Year |
q |
Quarter |
m |
Month |
y |
Day of Year |
d |
Day |
w |
Weekday |
ww |
Week of Year |
h |
Hour |
n |
Minute |
s |
Second |
Example#1 :-
Code :-
document.write("The current system date is:")
document.write(Date)
Output :-
The current system date is: 1/14/2002 |
Example#2 :-
Code :-
<%
Response. Write(Date())
%>
Output :-
5/9/2006
|
Note :- Even though "=date" is a short script,
it's actually made up of two parts. The "date" part tells
the server, "Get me the date." The equal sign (=) tells
the server to display the date in the Web page.
|