123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- {
- "comment" : "This is generated by ESQL’s AbstractFunctionTestCase. Do no edit it. See ../README.md for how to regenerate it.",
- "type" : "scalar",
- "name" : "to_datetime",
- "description" : "Converts an input value to a date value.\nA string will only be successfully converted if it’s respecting the format `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'`.\nTo convert dates in other formats, use `DATE_PARSE`.",
- "note" : "Note that when converting from nanosecond resolution to millisecond resolution with this function, the nanosecond date is truncated, not rounded.",
- "signatures" : [
- {
- "params" : [
- {
- "name" : "field",
- "type" : "date",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "date_nanos",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "double",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "integer",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "keyword",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "long",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "text",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- },
- {
- "params" : [
- {
- "name" : "field",
- "type" : "unsigned_long",
- "optional" : false,
- "description" : "Input value. The input can be a single- or multi-valued column or an expression."
- }
- ],
- "variadic" : false,
- "returnType" : "date"
- }
- ],
- "examples" : [
- "ROW string = [\"1953-09-02T00:00:00.000Z\", \"1964-06-02T00:00:00.000Z\", \"1964-06-02 00:00:00\"]\n| EVAL datetime = TO_DATETIME(string)",
- "ROW int = [0, 1]\n| EVAL dt = TO_DATETIME(int)"
- ],
- "preview" : false,
- "snapshot_only" : false
- }
|