Built-in RTD.DB Functions
The formula configuration table contains Excel-like formulas for getting data from RTD and DDE servers.
You can use built-in functions to update date and time fields if a server has no such fields.
For example:
TABLE_SCHEMA | TABLE_NAME | COLUMN_NAME | RTD_FORMULA |
---|---|---|---|
rtd | QuoteDayHistoryTOS | Symbol | |
rtd | QuoteDayHistoryTOS | Date | =Date() |
rtd | QuoteDayHistoryTOS | Time | =Time() |
rtd | QuoteDayHistoryTOS | Last | =TOS|LAST![Symbol] |
rtd | QuoteDayHistoryTOS | Change | =TOS|NET_CHANGE![Symbol] |
rtd | QuoteDayHistoryTOS | Bid | =TOS|BID![Symbol] |
rtd | QuoteDayHistoryTOS | Ask | =TOS|ASK![Symbol] |
Note that the current time is adjusted to the table time zone specified in the table configuration.
The second application of built-in formulas is getting aggregated time intervals like 15 minutes.
Just use the formulas like =DateTime15() or =Time15() to round up the current time.
Function List
Function | Result |
---|---|
=TimeStamp() | Returns the current UTC datetime |
=UtcNow() | Returns the current UTC datetime |
=Now() | Returns the current datetime |
=TableNow() | Returns the current datetime adjusted to the table time zone |
=DateTime() | Returns the last data update datetime |
=DateTime0() | Returns the last data update datetime rounded to 1 second up |
=DateTime1() | Returns the last data update datetime rounded to 1 minute up |
=DateTime5() | Returns the last data update datetime rounded to 5 minutes up |
=DateTime10() | Returns the last data update datetime rounded to 10 minutes up |
=DateTime15() | Returns the last data update datetime rounded to 15 minutes up |
=DateTime20() | Returns the last data update datetime rounded to 20 minutes up |
=DateTime30() | Returns the last data update datetime rounded to 30 minutes up |
=DateTime60() | Returns the last data update datetime rounded to 60 minutes up |
=Date() | Returns the last data update date |
=Time() | Returns the last data update time |
=Time0() | Returns the last data update time rounded to 1 second up |
=Time1() | Returns the last data update time rounded to 1 minute up |
=Time5() | Returns the last data update time rounded to 5 minutes up |
=Time10() | Returns the last data update time rounded to 10 minutes up |
=Time15() | Returns the last data update time rounded to 15 minutes up |
=Time20() | Returns the last data update time rounded to 20 minutes up |
=Time30() | Returns the last data update time rounded to 30 minutes up |
=Time60() | Returns the last data update time rounded to 60 minutes up |