{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "to_dateperiod",
  "description" : "Converts an input value into a `date_period` value.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "field",
          "type" : "date_period",
          "optional" : false,
          "description" : "Input value. The input is a valid constant date period expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_period"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "keyword",
          "optional" : false,
          "description" : "Input value. The input is a valid constant date period expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_period"
    },
    {
      "params" : [
        {
          "name" : "field",
          "type" : "text",
          "optional" : false,
          "description" : "Input value. The input is a valid constant date period expression."
        }
      ],
      "variadic" : false,
      "returnType" : "date_period"
    }
  ],
  "examples" : [
    "ROW x = \"2024-01-01\"::datetime\n| EVAL y = x + \"3 DAYS\"::date_period, z = x - TO_DATEPERIOD(\"3 days\");"
  ],
  "preview" : false,
  "snapshot_only" : false
}
