

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# Datetime format strings
<a name="r_FORMAT_strings"></a>

You can find a reference for datetime format strings following. 

The following format strings apply to functions such as TO\$1CHAR. These strings can contain datetime separators (such as '`-`', '`/`', or '`:`') and the following "dateparts" and "timeparts".

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/redshift/latest/dg/r_FORMAT_strings.html)

**Note**  
You must surround datetime separators (such as '-', '/' or ':') with single quotation marks, but you must surround the "dateparts" and "timeparts" listed in the preceding table with double quotation marks.

## Examples
<a name="r_FORMAT_strings-examples"></a>

For examples of formatting dates as strings, see [TO\$1CHAR](r_TO_CHAR.md).