Difference between revisions of "DayOfWeek"

From MultiCharts
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Returns a numerical value, indicating the day of the week corresponding to the specified date, where 0 = Sunday, 1 = Monday, etc.  
+
Returns a numerical value, indicating the day of the week corresponding to the specified date, 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday and 6 = Saturday.  
  
The Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.  
+
The Date is specified in the ''YYYMMdd'' format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.  
 
   
 
   
http://www.buyxanaxonlinepill.com/ purchase xanax online - xanax buy
+
== Usage ==
 +
<syntaxhighlight>DayOfWeek(YYYMMdd)</syntaxhighlight>
  
==== Example ====
+
Where:
<syntaxhighlight>DayOfWeek(1080101)  will return a value of 2, indicating Tuesday, for January 1st, 2008
 
  
DayOfWeek(990603) will return a value of 4, indicating Thursday, for June 3rd, 1999</syntaxhighlight>
+
:'''YYYMMdd''' - a numerical expression, specifying the date in YYYMMdd format.
 +
 +
== Examples ==
 +
<syntaxhighlight>DayOfWeek(1080101)</syntaxhighlight>
 +
Will return a value of 2, indicating Tuesday, for January 1st, 2008.
 +
 
 +
<syntaxhighlight>
 +
DayOfWeek(990603)</syntaxhighlight>
 +
Will return a value of 4, indicating Thursday, for June 3rd, 1999.
 +
 
 +
<syntaxhighlight>DayOfWeek(CurrentDate)</syntaxhighlight>
 +
Will return a value of 0, indicating that today is a Sunday.
  
 +
<syntaxhighlight>DayOfWeek(Date)</syntaxhighlight>
 +
Will return a value of 5 if the day of the current bar was a Friday.
  
 
[[Category:Date and Time Routines]]
 
[[Category:Date and Time Routines]]

Latest revision as of 12:31, 19 February 2012

Returns a numerical value, indicating the day of the week corresponding to the specified date, 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday and 6 = Saturday.

The Date is specified in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.

Usage

DayOfWeek(YYYMMdd)

Where:

YYYMMdd - a numerical expression, specifying the date in YYYMMdd format.

Examples

DayOfWeek(1080101)

Will return a value of 2, indicating Tuesday, for January 1st, 2008.

DayOfWeek(990603)

Will return a value of 4, indicating Thursday, for June 3rd, 1999.

DayOfWeek(CurrentDate)

Will return a value of 0, indicating that today is a Sunday.

DayOfWeek(Date)

Will return a value of 5 if the day of the current bar was a Friday.