Creates a Chart object compatible date and a time value.
Syntax: |
---|
ChartTime( YYYYMMDD, HHMM ) |
Parameter: |
Description: |
---|---|
YYYYMMDD |
Any valid numeric date in the YYYYMMDD format. Date must be a number without any delimiting characters. |
HHMM |
Any valid 24-hour HHMM formatted time value with no delimited characters between the hour and minute section of the time number.
Use a zero value when no time value is needed. |
Returns: |
---|
Date and time values are converted to the number of seconds that have elapsed since 01-01-0001 00:00:00 to the time when executed. This date and time format is the date & time format used by the chart object. |
Example: |
---|
' ---------------------------------------------------------------- ' test.currentDate without a time value PRINT "test.currentDate ", test.currentDate PRINT "ChartTime ", ChartTime(test.currentDate, 0)
Returns: test.currentDate , 2010-07-12 ChartTime , 63414536400.000000000
' ---------------------------------------------------------------- ' YYYYMMDD date in seconds, without a time value PRINT "ChartTime ", ChartTime(test.currentDate, test.currentTime) ChartTime 20130126, 63494755200.000000000
' ---------------------------------------------------------------- ' YYYYMMDD date in seconds, without a time value PRINT "ChartTime 20130126 ", ChartTime(20130126, 0) ChartTime 20130126, 63494755200.000000000
' ---------------------------------------------------------------- ' YYYYMMDD date in seconds, without a time value PRINT "ChartTime ", ChartTime(test.currentDate, test.currentTime)
Returns: ChartTime 20130126, 63494755200.000000000
' ---------------------------------------------------------------- ' AFTER TRADING DAY SCRIPT ASSIGNS TEST DATES TO BPV Auto-Index SERIES
' Store Test Dates & ChartTime seconds in two numeric series
' AFTER TEST Print Test Dates as elapsed seconds, and YYYYMMDD dates DateTimeArray[3] ,63414230400.000000000,20100709.000000000,
|
Notes: |
---|
SystemDate is a compatible date format, but it will return the same date value for a series, but might be useful as a label. SystemTime() function is not a compatible format for ChartTime. |
Links: |
---|
See Also: |
Edit Time: 9/18/2020 11:58:46 AM |
Topic ID#: 195 |