Skip to content

Commit d154e3b

Browse files
authored
Merge pull request #106539 from ginamr/master
Update GetCurrentDateTime precision
2 parents 3d97877 + c58fe51 commit d154e3b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

articles/cosmos-db/sql-query-getcurrentdatetime.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ GetCurrentDateTime ()
1919

2020
## Return types
2121

22-
Returns the current UTC date and time ISO 8601 string value in the format `YYYY-MM-DDThh:mm:ss.sssZ` where:
22+
Returns the current UTC date and time ISO 8601 string value in the format `YYYY-MM-DDThh:mm:ss.fffffffZ` where:
2323

2424
|||
2525
|-|-|
2626
|YYYY|four-digit year|
2727
|MM|two-digit month (01 = January, etc.)|
2828
|DD|two-digit day of month (01 through 31)|
2929
|T|signifier for beginning of time elements|
30-
|hh|two digit hour (00 through 23)|
31-
|mm|two digit minutes (00 through 59)|
32-
|ss|two digit seconds (00 through 59)|
33-
|.sss|three digits of decimal fractions of a second|
30+
|hh|two-digit hour (00 through 23)|
31+
|mm|two-digit minutes (00 through 59)|
32+
|ss|two-digit seconds (00 through 59)|
33+
|.fffffff|seven-digit fractional seconds|
3434
|Z|UTC (Coordinated Universal Time) designator||
3535

3636
For more information on the ISO 8601 format, see [ISO_8601](https://en.wikipedia.org/wiki/ISO_8601)
@@ -41,6 +41,8 @@ GetCurrentDateTime ()
4141

4242
The result returned is UTC.
4343

44+
Precision is 7 digits, with an accuracy of 100 nanoseconds.
45+
4446
## Examples
4547

4648
The following example shows how to get the current UTC Date Time using the GetCurrentDateTime() built-in function.
@@ -53,7 +55,7 @@ SELECT GetCurrentDateTime() AS currentUtcDateTime
5355

5456
```json
5557
[{
56-
"currentUtcDateTime": "2019-05-03T20:36:17.784Z"
58+
"currentUtcDateTime": "2019-05-03T20:36:17.1234567Z"
5759
}]
5860
```
5961

0 commit comments

Comments
 (0)