## Syntax ```mermaid %%{init: { 'theme': 'base', 'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' }, 'themeVariables': { 'fontSize': '11px', 'fontFamily': 'Arial' } }}%% flowchart LR Start((START)) --> TO_DATE[TO_DATE]:::quoted TO_DATE --> End((END)) ``` ## Purpose The `TO_DATE` SQL function converts a value into a datetime. Parameters: - Input: value to convert. - Format: format mask. Optional; defaults to American style. The list of format masks is available in [[Format Masks]]. Returns: the input converted to a datetime.