Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Data Access Server (RTQP Engine)

ROUND with a DateTime argument

  • Last UpdatedDec 19, 2022
  • 1 minute read

The ROUND function returns the time stamp (x) rounded to the nearest second or to the precision specified (timeUnit).

Syntax

DateTime ROUND(x DateTime)
DateTime ROUND(x DateTime, timeUnit TimeUnit)
Time ROUND(x TimeSpan)
Time ROUND(x TimeSpan, timeUnit TimeUnit)

Arguments

  • x

    Must be DateTime or TimeSpan.

  • timeUnit

    The following are valid precision values: day, hour, minute, second, millisecond, microsecond, or nanosecond.

    Note: The ROUND function also works with a numeric argument. For more information, see ROUND with a numeric argument.

In This Topic
TitleResults for “How to create a CRG?”Also Available in