ROUND with DateTime
- Last UpdatedSep 29, 2022
- 1 minute read
- PI System
- PI OLEDB Enterprise 2019
- Developer
By using in a query, you can determine to round a fraction and precise which decimal place gets rounded.
DateTime ROUND(x DateTime, fractionPrecision Int32 = 0)
Examples
If you set the Integer to 0, the query will return results where the milliseconds are rounded to full seconds.
If you set the Integer to 1, the query will return results where the milliseconds are rounded to the first decimal place.
If you set the Integer to 2, the query will return results where the milliseconds are rounded to the second decimal place.