Ceiling
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2024 R2
- PI Server
Return the nearest integer greater than or equal to x.
Syntax
Ceiling(x)
Arguments
-
x
integer or a real number, an attribute whose value evaluates to a number
Returns
The nearest integer greater than or equal to x
Exceptions
Returns an error if x is a digital state, time expression, time interval or a string
Notes
Unit of measure of the argument, if it exists, is carried over to the result
Example
-
Ceiling(2.3)
[Returns 3]
-
Ceiling(-2.3)
[Returns -2]
-
Ceiling(TagVal('att1', '12/30/16'))
[Return the nearest integer to the value of 'att1' at the start of day (12:00am) on December 30, 2016]