본문 바로가기

카테고리 없음

MySQL 날짜 형식과 사용법 알아보기.

MySQL Date Format

MySQL allows users to store and manipulate date and time values in various formats. The most common date format used in MySQL is YYYY-MM-DD, which represents the year, month, and day in a 4-digit format separated by hyphens.

Here are some examples of how dates can be represented in MySQL:

  • 2022-01-15 : January 15, 2022
  • 1990-12-25 : December 25, 1990
  • 2023-03-10 : March 10, 2023

In addition to the YYYY-MM-DD format, MySQL also supports other date and time formats such as YYYY-MM-DD HH:MM:SS for storing both date and time information.

Overall, understanding the date format in MySQL is essential for effectively storing and querying date and time values in databases.