File tree 1 file changed +24
-0
lines changed
x-pack/plugin/esql/qa/testFixtures/src/main/resources
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,30 @@ birth_date:date |bd:date
200
200
1964-06-02T00:00:00.000Z|1964-06-02T00:00:00.000Z
201
201
;
202
202
203
+ convert with zones
204
+ ROW str = "2025-04-11T05:00:00+0400"
205
+ | EVAL dt = TO_DATETIME(str);
206
+
207
+ str:String | dt:datetime
208
+ "2025-04-11T05:00:00+0400" | 2025-04-11T01:00:00.000Z
209
+ ;
210
+
211
+ equality with zones
212
+ ROW dt = TO_DATETIME("2025-04-11T01:00:00.000Z")
213
+ | EVAL bool = "2025-04-11T05:00:00+0400" == dt;
214
+
215
+ dt:datetime | bool:boolean
216
+ 2025-04-11T01:00:00.000Z | true
217
+ ;
218
+
219
+ convert no zone
220
+ ROW str = "2025-04-11T05:00:00.000"
221
+ | EVAL dt = TO_DATETIME(str);
222
+
223
+ str:String | dt:datetime
224
+ "2025-04-11T05:00:00.000" | 2025-04-11T05:00:00.000Z
225
+ ;
226
+
203
227
convertFromString#[skip:-8.13.99, reason: default date formatter is changed in 8.14]
204
228
// tag::to_datetime-str[]
205
229
ROW string = ["1953-09-02T00:00:00.000Z", "1964-06-02T00:00:00.000Z", "1964-06-02 00:00:00"]
You can’t perform that action at this time.
0 commit comments