SQL
`strptime` Examples
The [`strptime(text, format)` function](#docs:sql:functions:timestamp::strptimetext-format) converts strings to timestamps according to the specified pattern.  
```sql
SELECT strptime('02/03/1992', '%d/%m/%Y');
```  
```text
1992-03-02 00:00:00
```  
```sql
SELECT strptime('Monday, 2 March 1992 - 08:32:45 PM', '%A, %-d %B %Y - %I:%M:%S %p');
```  
```text
1992-03-02 20:32:45
```  
The `strptime` function throws an error on failure:  
```sql
SELECT strptime('02/50/1992', '%d/%m/%Y') AS x;
```  
```console
Invalid Input Error: Could not parse string "02/50/1992" according to format specifier "%d/%m/%Y"
02/50/1992
^
Error: Month out of range, expected a value between 1 and 12
```  
To return `NULL` on failure, use the [`try_strptime` function](#docs:sql:functions:timestamp::try_strptimetext-format):  
```text
NULL
```