# TODATE

TODATE( `text`, `[format]` )&#x20;

Convert text into a date/time value

### Arguments

| Argument   | Description                                                                                                                                                            |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `text`     | Text to convert to date                                                                                                                                                |
| `[format]` | Optional: strftime format of `text`. See strftime documentation for more information: <https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior> |

### Output

Date/time object corresponding to `text`

### Examples

```
TODATE("2015-12-22")
>> 12/22/2015
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cascade.io/cascade/functions-and-expressions/functions/conversion/todate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
