Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 14:32:05 +0000



New Spreadsheet Functions

View Count: 2630

[2014-09-15 23:35:12]
Sierra Chart Engineering - Posts: 104368
We have noticed some complicated techniques to truncate/round-down date-time values, such as to the second, or to the minute. Therefore, to solve this we have added three new formula functions. They are documented below. These will be out in the next release.

TRUNCHOUR
Truncate to the Hour
{double} TRUNCHOUR(DateTime, [Hours = 1])
Number of arguments: 1-2
Argument-expansion: values
Returns the given DateTime truncated down to the exact hour. If Hours is greater than 1, the given DateTime is truncated down to the interval of the given Hours (e.g. 2 hours, 3 hours, etc.). Returns #NUM! if the given Hours is less than 1. Returns #VALUE! if the given DateTime is not a number, or the given Hours is not an integer.

TRUNCMIN
Truncate to the Minute
{double} TRUNCMIN(DateTime, [Minutes = 1])
Number of arguments: 1-2
Argument-expansion: values
Returns the given DateTime truncated down to the exact minute. If Minutes is greater than 1, the given DateTime is truncated down to the interval of the given Minutes (e.g. 5 minutes, 10 minutes, etc.). Returns #NUM! if the given Minutes is less than 1. Returns #VALUE! if the given DateTime is not a number, or the given Minutes is not an integer.

TRUNCSEC
Truncate to the Second
{double} TRUNCSEC(DateTime, [Seconds = 1])
Number of arguments: 1-2
Argument-expansion: values
Returns the given DateTime truncated down to the exact second. If Seconds is greater than 1, the given DateTime is truncated down to the interval of the given Seconds (e.g. 5 seconds, 10 seconds, etc.). Returns #NUM! if the given Seconds is less than 1. Returns #VALUE! if the given DateTime is not a number, or the given Seconds is not an integer.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account