Skip to main content
TO_DATE

Converts text to a date format

Updated over a year ago

Description

The TO_DATE() function is used to convert text data into a date format. This is particularly useful when you have text-based date values and need to perform date-related operations on them.

Syntax

TO_DATE(text)

Output

date

Variables

  1. text: The text data representing the date that you want to convert into a date format. It should be in a recognizable date format, such as "YYYY-MM-DD" or "MM/DD/YYYY."

Example

TO_DATE(`DOB`)

Name

DOB

TO_DATE(`DOB`)

Giacomo

2/15/1983

1983-02-15

Kameko

4/19/1969

1969-04-19

Anne

2/06/2012

2012-02-06

Orlando

4/28/1988

1988-04-28

Nasim

3/02/2007

2007-03-02

Did this answer your question?