{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "date_parse",
  "description" : "Returns a date by parsing the second argument using the format specified in the first argument.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "datePattern",
          "type" : "keyword",
          "optional" : true,
          "description" : "The date format. Refer to the {javadoc14}/java.base/java/time/format/DateTimeFormatter.html[`DateTimeFormatter` documentation] for the syntax. If `null`, the function returns `null`."
        },
        {
          "name" : "dateString",
          "type" : "keyword",
          "optional" : false,
          "description" : "Date expression as a string. If `null` or an empty string, the function returns `null`."
        }
      ],
      "variadic" : false,
      "returnType" : "date"
    },
    {
      "params" : [
        {
          "name" : "datePattern",
          "type" : "keyword",
          "optional" : true,
          "description" : "The date format. Refer to the {javadoc14}/java.base/java/time/format/DateTimeFormatter.html[`DateTimeFormatter` documentation] for the syntax. If `null`, the function returns `null`."
        },
        {
          "name" : "dateString",
          "type" : "text",
          "optional" : false,
          "description" : "Date expression as a string. If `null` or an empty string, the function returns `null`."
        }
      ],
      "variadic" : false,
      "returnType" : "date"
    },
    {
      "params" : [
        {
          "name" : "datePattern",
          "type" : "text",
          "optional" : true,
          "description" : "The date format. Refer to the {javadoc14}/java.base/java/time/format/DateTimeFormatter.html[`DateTimeFormatter` documentation] for the syntax. If `null`, the function returns `null`."
        },
        {
          "name" : "dateString",
          "type" : "keyword",
          "optional" : false,
          "description" : "Date expression as a string. If `null` or an empty string, the function returns `null`."
        }
      ],
      "variadic" : false,
      "returnType" : "date"
    },
    {
      "params" : [
        {
          "name" : "datePattern",
          "type" : "text",
          "optional" : true,
          "description" : "The date format. Refer to the {javadoc14}/java.base/java/time/format/DateTimeFormatter.html[`DateTimeFormatter` documentation] for the syntax. If `null`, the function returns `null`."
        },
        {
          "name" : "dateString",
          "type" : "text",
          "optional" : false,
          "description" : "Date expression as a string. If `null` or an empty string, the function returns `null`."
        }
      ],
      "variadic" : false,
      "returnType" : "date"
    }
  ],
  "examples" : [
    "ROW date_string = \"2022-05-06\"\n| EVAL date = DATE_PARSE(\"yyyy-MM-dd\", date_string)"
  ],
  "preview" : false,
  "snapshot_only" : false
}
