×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

StringToDate

37 bytes added, 13:31, 4 February 2012
no edit summary
The integer portion of the DateTime value indicates the number of days that have elapsed since January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day that has passed since midnight.
==== Usage ====
<syntaxhighlight>StringToDate("MM/dd/yy")</syntaxhighlight>
<syntaxhighlight>StringToDate("MM/dd/yyyy")</syntaxhighlight>
Where: [[MM]] - month*
[[dd]] :'''MM''' - day of the month*
[[yy]] :'''dd''' - a two-digit year day of the month*
[[yyyy]] - a four-digit year ==== Notes ==== [[*]]Described usage and examples are for the default US regional date format. If the default UK regional format is selected, the dates will be in :'''dd/MM/yy''' and '''dd/MM/yyyy''' format instead. Date format is controlled by the Regional Options settings that can be accessed from the Control Panel of the Windows XP operating system. ==== Example ====<syntaxhighlight>StringToDate("01/01/2008") will return - a value of 39448.00000000, corresponding to the specified date of January 1st, 2008two-digit year
StringToDate("04/04/99") will return :'''yyyy''' - a value of 36254.00000000, corresponding to the specifieddate of April 4th, 1999</syntaxhighlight> four-digit year
=== Notes ===
'''*''': Described usage and examples are for the default US regional date format. If the default UK regional format is selected, the dates will be in '''dd/MM/yy''' and '''dd/MM/yyyy''' format instead. Date format is controlled by the Regional Options settings that can be accessed from the Control Panel of the Windows XP operating system.
== Example ==
<syntaxhighlight>StringToDate("01/01/2008");</syntaxhighlight>
Will return a value of 39448.00000000, corresponding to the specified date of January 1st, 2008.
<syntaxhighlight>StringToDate("04/04/99");</syntaxhighlight>
Will return a value of 36254.00000000, corresponding to the specified date of April 4th, 1999.
[[Category:Date and Time Routines]]

Navigation menu