From aa3a9dd622b924990d3ece0e4b7c1a7ba05cfd4b Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 3 Feb 2023 11:47:46 +0800 Subject: [PATCH] docs: latest timestamp allowed when inserting data --- docs/en/12-taos-sql/05-insert.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/12-taos-sql/05-insert.md b/docs/en/12-taos-sql/05-insert.md index 97d45700db..a5402ea1b4 100644 --- a/docs/en/12-taos-sql/05-insert.md +++ b/docs/en/12-taos-sql/05-insert.md @@ -27,7 +27,7 @@ INSERT INTO tb_name [(field1_name, ...)] subquery 2. The precision of a timestamp depends on its format. The precision configured for the database affects only timestamps that are inserted as long integers (UNIX time). Timestamps inserted as date and time strings are not affected. As an example, the timestamp 2021-07-13 16:16:48 is equivalent to 1626164208 in UNIX time. This UNIX time is modified to 1626164208000 for databases with millisecond precision, 1626164208000000 for databases with microsecond precision, and 1626164208000000000 for databases with nanosecond precision. 3. If you want to insert multiple rows simultaneously, do not use the NOW function in the timestamp. Using the NOW function in this situation will cause multiple rows to have the same timestamp and prevent them from being stored correctly. This is because the NOW function obtains the current time on the client, and multiple instances of NOW in a single statement will return the same time. - The earliest timestamp that you can use when inserting data is equal to the current time on the server minus the value of the KEEP parameter(You can configure the KEEP parameter when you create a database and the default value is 3650 days). The latest timestamp you can use when inserting data depends on the PRECISION parameter (You can configure the PRECISION parameter when you create a database, ms means milliseconds, us means microseconds, ns means nanoseconds, and the default value is milliseconds): If the timestamp precision is milliseconds or microseconds, the values is 00:00:00.000 UTC on 1 January 1970 plus 1000 years, that is, 00:00:00.000 UTC on 1 January 2970; If the timestamp precision is nanoseconds, the value is 00:00:00.000000000 UTC on 1 January 1970 plus 292 years, that is,00:00:00.000000000 UTC on 1 January 2262. + The earliest timestamp that you can use when inserting data is equal to the current time on the server minus the value of the KEEP parameter (You can configure the KEEP parameter when you create a database and the default value is 3650 days). The latest timestamp you can use when inserting data depends on the PRECISION parameter (You can configure the PRECISION parameter when you create a database, ms means milliseconds, us means microseconds, ns means nanoseconds, and the default value is milliseconds). If the timestamp precision is milliseconds or microseconds, the latest timestamp is 00:00:00.000 UTC on 1 January 1970 plus 1000 years, that is, 00:00:00.000 UTC on 1 January 2970; If the timestamp precision is nanoseconds, the latest timestamp is 00:00:00.000000000 UTC on 1 January 1970 plus 292 years, that is, 00:00:00.000000000 UTC on 1 January 2262. **Syntax** -- GitLab