Round a Number
Syntax:
round(Number, [Precision])
precision(Number, [Precision])
Rounds a number to a specified number of decimal places or to the nearest whole number. You can use precision()
as an alternative syntax and you can also round a number down with floor()
or rounddown()
or round a number up with ceil()
or roundup()
.
Examples
Round a Date
Syntax:
round(Date, [year/month/day])
Adjusts the precision of a date. It is useful when you want to perform calculations based on the month or year instead of a specific day.