Ceil
Returns the rounded-up value.
Variants
- Ceil(Duration duration, Duration significance)
- Ceil(Numeric number)
- Ceil(Numeric number, Numeric significance)
- Ceil(Time time, Duration significance)
Ceil(Duration duration, Duration significance)
Returns the smallest multiple of the significance that is greater than or equal to the duration.
Parameters
- duration
- The value you want to round up.
- significance
- The multiple to which you want to round up.
Returns
Duration
Remarks
Note that if the significance is negative, the result is closer to negative infinity than the duration is.
Examples
Ceil(Hours(7), Hours(5))returns 10 hrsCeil(Hours(-7), Hours(5))returns -5 hrsCeil(Hours(7), Hours(-5))returns 5 hrsCeil(Hours(-7), Hours(-5))returns -10 hrs
Ceil(Numeric number)
Returns the smallest integer greater than or equal to the number.
Parameters
- number
- The value you want to round up.
Returns
Numeric
Examples
Ceil(4.9)returns 5Ceil(-4.9)returns -4Ceil(-0.9)returns 0
Ceil(Numeric number, Numeric significance)
Returns the smallest multiple of significance that is greater than or equal to the number.
Parameters
- number
- The value you want to round up.
- significance
- The multiple to which you want to round up.
Returns
Numeric
Remarks
Note that if the significance is a negative number, the result is closer to negative infinity than the number is.
Examples
Ceil(7, 5)returns 10Ceil(-7, 5)returns -5Ceil(7, -5)returns 5Ceil(-7, -5)returns -10
Ceil(Time time, Duration significance)
Returns the smallest multiple of the significance that is greater than or equal to the time.
Parameters
- time
- The value you want to round up.
- significance
- The multiple to which you want to round up.
Returns
Time
Examples
Ceil(Time(21, 15), Hours(2))returns 10:00 PM (or 22:00). 22:00 is the smallest multiple of 2 that is greater than 21:15.ToTimestamp(ToDate([Date Created]), Ceil(ToTimeOfDay([Date Created]), 15m))returns the "Date Created" timestamp rounded up to the nearest 15 minutes.