p), which represents the number of digits to retain after seconds. A maximum of 6 digits can be retained (accurate to the microsecond). The digits after p are padded with 0. If p is not specified, a DATETIME value accurate to the second is returned.
The following example returns date and time values when different precision is specified.
Syntax
Parameters
p: optional, the specified precision, that is, the number of digits to retain after seconds. It must be an INT value within the range of [1,6]. select now(0) is equivalent to select now().
Return value
- If
pis not specified, this function returns a DATETIME value accurate to the second. - If
pis specified, this function returns a date and time value of the specified precision.
Examples
Text