Day Function

Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE


The Day function returns the number of the current day of the month using any valid date expression as an argument. The Day function returns a number between 1 and 31 that represents the day of the month. The Day function in ASP lets you find out what day in the current month it is. If the current date is January 3, then the Day function will return 3. So, for example if you have a Start Date variable and want to extract just the day part, you would say.
StartDay = Day(StartDate)
StartDay would then be equal to the value 3.

The Syntax of the Day function is :-

Day(date)

Example#1 :-

Code :-
document.write(Date & "<br />")
document.write(Day(Date))
Output :-
1/14/2002
14

Example#2 :-

Code :-
<% =Day(Date) %>
Output :-
16

Example#3 :-

Code :-
<% =Day("6/26/1943") %>
Output :-

26

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641