웹개발자공부/MySQL

MySQL - DATEDIFF함수의 정의

박더그 2023. 2. 15. 02:33

MySQL의 날짜관련 문법 중 DATEDIFF함수의 정의는 하기와 같습니다.

MySQL 공식 문서를 참고하였습니다.

https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_datediff

 

MySQL :: MySQL 8.0 Reference Manual :: 12.7 Date and Time Functions

12.7 Date and Time Functions This section describes the functions that can be used to manipulate temporal values. See Section 11.2, “Date and Time Data Types”, for a description of the range of values each date and time type has and the valid formats

dev.mysql.com

 

• DATEDIFF(expr1,expr2)

expr1과 expr2의 차이를 date로 나타냅니다.

DATEDIFF이외에도 TIMEDIFF, TIMESTAMPDIFF, PERIOD_DIFF 등이 있습니다.