You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/asciidoc/en/rlsnotes/rlsnotes40/_compatibility-40.adoc
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,51 @@ Enforcement of the appropriate usage means that attempting to combine both becom
204
204
Existing code where usage does not break the rule remains unaffected.
205
205
Both `'NOW'` and `CAST('NOW' AS TIMESTAMP)` continue to work as before, as well as code that correctly uses the date/time prefixes with explicit literals, like `DATE '2019-02-20'`.
206
206
207
+
[#rnfb40-compat-datetime-string]
208
+
==== Datetime Literal Syntax Changes
209
+
210
+
To avoid ambiguities with time zones, the datetime literal syntax -- also used when casting strings to datetime types -- had to be changed.
211
+
In previous versions, any element of a datetime (e.g. year, minutes, etc.) could be separated by whitespace, `.`, `:`, `,`, `-`, and `/`.
The choice of the separator `<p>` in a date decides whether the parser reads `MM<p>DD` or `DD<p>MM`.
242
+
====
243
+
244
+
[TIP]
245
+
====
246
+
Although the Firebird datetime syntax is still very flexible, to avoid ambiguity we recommend using the ISO-8601 order (year-month-day), '```-```' as the date separator, 4 digits for year, 2 digits for month, day, minute and second, and '```.```' as second.fractions separator.
247
+
This format is also the only one defined in the SQL standard.
248
+
249
+
In short, use `TIMESTAMP '2021-05-03 04:05:00.1 +02:00'`, not `TIMESTAMP '3.5.21 4:5:0:1 +2:0'`.
0 commit comments