본문 바로가기

카테고리 없음

MySQL 날짜 형식 이해하기.

MySQL Date Format

MySQL allows you to store and manipulate dates in various formats. The DATE data type is used to store dates in the format 'YYYY-MM-DD'.

When inserting a date into a MySQL table, you can use the following format: 'YYYY-MM-DD'. For example, '2021-09-30'.

You can also extract and manipulate specific parts of a date using functions like DATE_FORMAT(), YEAR(), MONTH(), DAY(), etc. These functions allow you to format the date in different ways or extract specific parts of the date.

It is important to ensure that the date format you use is compatible with MySQL's date format in order to avoid any errors when working with dates in your database.

Overall, MySQL provides powerful date manipulation capabilities that can help you efficiently work with dates in your database.