STR_TO_DATE() in MySQL — How It Works

What the MySQL STR_TO_DATE() function does, with an example.

Published October 19, 2026

STR_TO_DATE() parses a string into a date value according to a specified format.

Key points

  • Part of standard SQL functions available in MySQL for working with dates and times

Example

SELECT STR_TO_DATE('01/15/2024', '%m/%d/%Y');
More SQL articles