여러분이 사용하고 계신 브라우저는 HTML5를 지원하지 않기 때문에 몇몇 요소가 제대로 보이도록 JScript를 사용하고 있습니다. 하지만 여러분의 브라우저 설정에서 스크립트 기능이 꺼져있으므로, 현재 페이지를 제대로 확인하시려면 스크립트 기능을 켜주셔야 합니다. MySQL - 참조 - 함수 - DATE()
MySQL – 참조 – 함수 – DATE()
1년전 작성
10개월전 수정

DATE()

DATE() 함수는 datetime 식에서 날짜 부분을 추출한다.

MySQL 4.0부터 작동한다.

형식
DATE(expression)
매개변수
expression
:
유효한 날짜/날짜 값. 식이 날짜 또는 날짜 시간이 아닌 경우 NULL을 반환한다.
예제
날짜 부분을 추출하자.
SELECT DATE("2017-06-15");
기본 예시
DATE(“2017-06-15”)
2017-06-15
날짜 부분을 추출하자.
SELECT DATE("2017-06-15 09:34:21");
기본 예시
DATE(“2017-06-15 09:34:21”)
2017-06-15
날짜 부분 추출하자. NULL 값을 반환한다.
SELECT DATE("The date is 2017-06-15");
기본 예시
 
날짜 부분을 추출하자.
SELECT DATE(OrderDate) FROM Orders;
기본 예시
DATE(OrderDate)
1996-07-04
1996-07-05
1996-07-08
1996-07-08
1996-07-09
1996-07-10
1996-07-11
1996-07-12
1996-07-15
1996-07-16
1996-07-17
1996-07-18
1996-07-19
1996-07-19
1996-07-22
1996-07-23
1996-07-24
1996-07-25
1996-07-26
1996-07-29
1996-07-30
1996-07-31
1996-08-01
1996-08-01
1996-08-02
1996-08-05
1996-08-06
1996-08-07
1996-08-08
1996-08-09
1996-08-12
1996-08-13
1996-08-14
1996-08-14
1996-08-15
1996-08-16
1996-08-19
1996-08-20
1996-08-21
1996-08-22
1996-08-23
1996-08-26
1996-08-27
1996-08-27
1996-08-28
1996-08-29
1996-08-30
1996-09-02
1996-09-03
1996-09-04
1996-09-05
1996-09-06
1996-09-09
1996-09-09
1996-09-10
1996-09-11
1996-09-12
1996-09-13
1996-09-16
1996-09-17
1996-09-18
1996-09-19
1996-09-20
1996-09-20
1996-09-23
1996-09-24
1996-09-25
1996-09-26
1996-09-27
1996-09-30
1996-10-01
1996-10-02
1996-10-03
1996-10-03
1996-10-04
1996-10-07
1996-10-08
1996-10-09
1996-10-10
1996-10-11
1996-10-14
1996-10-15
1996-10-16
1996-10-16
1996-10-17
1996-10-18
1996-10-21
1996-10-22
1996-10-23
1996-10-24
1996-10-25
1996-10-28
1996-10-29
1996-10-29
1996-10-30
1996-10-31
1996-11-01
1996-11-04
1996-11-05
1996-11-06
1996-11-07
1996-11-08
1996-11-11
1996-11-11
1996-11-12
1996-11-13
1996-11-14
1996-11-15
1996-11-18
1996-11-19
1996-11-20
1996-11-21
1996-11-22
1996-11-22
1996-11-25
1996-11-26
1996-11-26
1996-11-27
1996-11-28
1996-11-28
1996-11-29
1996-12-02
1996-12-03
1996-12-03
1996-12-04
1996-12-05
1996-12-05
1996-12-06
1996-12-09
1996-12-09
1996-12-10
1996-12-11
1996-12-12
1996-12-12
1996-12-13
1996-12-16
1996-12-16
1996-12-17
1996-12-18
1996-12-18
1996-12-19
1996-12-20
1996-12-23
1996-12-23
1996-12-24
1996-12-25
1996-12-25
1996-12-26
1996-12-27
1996-12-27
1996-12-30
1996-12-31
1997-01-01
1997-01-01
1997-01-02
1997-01-03
1997-01-03
1997-01-06
1997-01-07
1997-01-07
1997-01-08
1997-01-09
1997-01-10
1997-01-10
1997-01-13
1997-01-14
1997-01-14
1997-01-15
1997-01-16
1997-01-16
1997-01-17
1997-01-20
1997-01-21
1997-01-21
1997-01-22
1997-01-23
1997-01-23
1997-01-24
1997-01-27
1997-01-27
1997-01-28
1997-01-29
1997-01-30
1997-01-30
1997-01-31
1997-02-03
1997-02-03
1997-02-04
1997-02-05
1997-02-05
1997-02-06
1997-02-07
1997-02-10
1997-02-10
1997-02-11
1997-02-12
1997-02-12
1997-02-13
1997-02-14
1997-02-14
1997-02-17
1997-02-18
1997-02-19
1997-02-19
1997-02-20
1997-02-21
1997-02-21
1997-02-24
1997-02-25
1997-02-25
1997-02-26
1997-02-27
1997-02-28
1997-02-28
1997-03-03
1997-03-04
1997-03-04
1997-03-05
1997-03-06
1997-03-06
1997-03-07
1997-03-10
1997-03-11
1997-03-11
1997-03-12
1997-03-13
1997-03-13
1997-03-14
1997-03-17
1997-03-17
1997-03-18
1997-03-19
1997-03-20
1997-03-20
1997-03-21
1997-03-24
1997-03-24
1997-03-25
1997-03-26
1997-03-26
1997-03-27
1997-03-28
1997-03-31
1997-03-31
1997-04-01
1997-04-02
1997-04-02
1997-04-03
1997-04-04
1997-04-04
1997-04-07
1997-04-08
1997-04-09
1997-04-09
1997-04-10
1997-04-11
1997-04-11
1997-04-14
1997-04-15
1997-04-15
1997-04-16
1997-04-17
1997-04-18
1997-04-18
1997-04-21
1997-04-22
1997-04-22
1997-04-23
1997-04-24
1997-04-24
1997-04-25
1997-04-28
1997-04-29
1997-04-29
1997-04-30
1997-05-01
1997-05-01
1997-05-02
1997-05-05
1997-05-05
1997-05-06
1997-05-07
1997-05-08
1997-05-08
1997-05-09
1997-05-12
1997-05-12
1997-05-13
1997-05-14
1997-05-14
1997-05-15
1997-05-16
1997-05-19
1997-05-19
1997-05-20
1997-05-21
1997-05-21
1997-05-22
1997-05-23
1997-05-23
1997-05-26
1997-05-27
1997-05-28
1997-05-28
1997-05-29
1997-05-30
1997-05-30
1997-06-02
1997-06-03
1997-06-03
1997-06-04
1997-06-05
1997-06-06
1997-06-06
1997-06-09
1997-06-10
1997-06-10
1997-06-11
1997-06-12
1997-06-12
1997-06-13
1997-06-16
1997-06-17
1997-06-17
1997-06-18
1997-06-19
1997-06-19
1997-06-20
1997-06-23
1997-06-23
1997-06-24
1997-06-25
1997-06-26
1997-06-26
1997-06-27
1997-06-30
1997-06-30
1997-07-01
1997-07-02
1997-07-02
1997-07-03
1997-07-04
1997-07-07
1997-07-07
1997-07-08
1997-07-09
1997-07-09
1997-07-10
1997-07-11
1997-07-11
1997-07-14
1997-07-15
1997-07-16
1997-07-16
1997-07-17
1997-07-18
1997-07-18
1997-07-21
1997-07-22
1997-07-22
1997-07-23
1997-07-24
1997-07-25
1997-07-25
1997-07-28
1997-07-29
1997-07-29
1997-07-30
1997-07-31
1997-07-31
1997-08-01
1997-08-04
1997-08-05
1997-08-05
1997-08-06
1997-08-07
1997-08-07
1997-08-08
1997-08-11
1997-08-11
1997-08-12
1997-08-12
1997-08-13
1997-08-14
1997-08-14
1997-08-15
1997-08-15
1997-08-18
1997-08-19
1997-08-19
1997-08-20
1997-08-20
1997-08-21
1997-08-22
1997-08-22
1997-08-25
1997-08-25
1997-08-26
1997-08-27
1997-08-27
1997-08-28
1997-08-28
1997-08-29
1997-09-01
1997-09-01
1997-09-02
1997-09-02
1997-09-03
1997-09-04
1997-09-04
1997-09-05
1997-09-05
1997-09-08
1997-09-09
1997-09-09
1997-09-10
1997-09-10
1997-09-11
1997-09-12
1997-09-12
1997-09-15
1997-09-15
1997-09-16
1997-09-17
1997-09-17
1997-09-18
1997-09-18
1997-09-19
1997-09-22
1997-09-22
1997-09-23
1997-09-23
1997-09-24
1997-09-25
1997-09-25
1997-09-26
1997-09-26
1997-09-29
1997-09-30
1997-09-30
1997-10-01
1997-10-01
1997-10-02
1997-10-03
1997-10-03
1997-10-06
1997-10-06
1997-10-07
1997-10-08
1997-10-08
1997-10-09
1997-10-09
1997-10-10
1997-10-13
1997-10-13
1997-10-14
1997-10-14
1997-10-15
1997-10-16
1997-10-16
1997-10-17
1997-10-17
1997-10-20
1997-10-21
1997-10-21
1997-10-22
1997-10-22
1997-10-23
1997-10-24
1997-10-24
1997-10-27
1997-10-27
1997-10-28
1997-10-29
1997-10-29
1997-10-30
1997-10-30
1997-10-31
1997-11-03
1997-11-03
1997-11-04
1997-11-04
1997-11-05
1997-11-06
1997-11-06
1997-11-07
1997-11-07
1997-11-10
1997-11-11
1997-11-11
1997-11-12
1997-11-12
1997-11-13
1997-11-14
1997-11-14
1997-11-17
1997-11-17
1997-11-18
1997-11-19
1997-11-19
1997-11-20
1997-11-20
1997-11-21
1997-11-24
1997-11-24
1997-11-25
1997-11-25
1997-11-26
1997-11-27
1997-11-27
1997-11-28
1997-11-28
1997-12-01
1997-12-02
1997-12-02
1997-12-03
1997-12-03
1997-12-04
1997-12-05
1997-12-05
1997-12-08
1997-12-08
1997-12-09
1997-12-10
1997-12-10
1997-12-11
1997-12-11
1997-12-12
1997-12-15
1997-12-15
1997-12-16
1997-12-16
1997-12-16
1997-12-17
1997-12-17
1997-12-18
1997-12-18
1997-12-18
1997-12-19
1997-12-19
1997-12-22
1997-12-22
1997-12-22
1997-12-23
1997-12-23
1997-12-24
1997-12-24
1997-12-24
1997-12-25
1997-12-25
1997-12-26
1997-12-26
1997-12-26
1997-12-29
1997-12-29
1997-12-30
1997-12-30
1997-12-30
1997-12-31
1997-12-31
1998-01-01
1998-01-01
1998-01-01
1998-01-02
1998-01-02
1998-01-05
1998-01-05
1998-01-05
1998-01-06
1998-01-06
1998-01-07
1998-01-07
1998-01-07
1998-01-08
1998-01-08
1998-01-09
1998-01-09
1998-01-09
1998-01-12
1998-01-12
1998-01-13
1998-01-13
1998-01-13
1998-01-14
1998-01-14
1998-01-15
1998-01-15
1998-01-15
1998-01-16
1998-01-16
1998-01-19
1998-01-19
1998-01-19
1998-01-20
1998-01-20
1998-01-21
1998-01-21
1998-01-21
1998-01-22
1998-01-22
1998-01-23
1998-01-23
1998-01-23
1998-01-26
1998-01-26
1998-01-27
1998-01-27
1998-01-27
1998-01-28
1998-01-28
1998-01-29
1998-01-29
1998-01-29
1998-01-30
1998-01-30
1998-02-02
1998-02-02
1998-02-02
1998-02-03
1998-02-03
1998-02-04
1998-02-04
1998-02-04
1998-02-05
1998-02-05
1998-02-06
1998-02-06
1998-02-06
1998-02-09
1998-02-09
1998-02-10
1998-02-10
1998-02-10
1998-02-11
1998-02-11
1998-02-12
1998-02-12
1998-02-12
1998-02-13
1998-02-13
1998-02-16
1998-02-16
1998-02-16
1998-02-17
1998-02-17
1998-02-18
1998-02-18
1998-02-18
1998-02-19
1998-02-19
1998-02-20
1998-02-20
1998-02-20
1998-02-23
1998-02-23
1998-02-24
1998-02-24
1998-02-24
1998-02-25
1998-02-25
1998-02-26
1998-02-26
1998-02-26
1998-02-26
1998-02-26
1998-02-26
1998-02-27
1998-02-27
1998-02-27
1998-03-02
1998-03-02
1998-03-02
1998-03-03
1998-03-03
1998-03-03
1998-03-03
1998-03-04
1998-03-04
1998-03-04
1998-03-05
1998-03-05
1998-03-05
1998-03-06
1998-03-06
1998-03-06
1998-03-06
1998-03-09
1998-03-09
1998-03-09
1998-03-10
1998-03-10
1998-03-10
1998-03-11
1998-03-11
1998-03-11
1998-03-11
1998-03-12
1998-03-12
1998-03-12
1998-03-13
1998-03-13
1998-03-13
1998-03-16
1998-03-16
1998-03-16
1998-03-16
1998-03-17
1998-03-17
1998-03-17
1998-03-18
1998-03-18
1998-03-18
1998-03-19
1998-03-19
1998-03-19
1998-03-19
1998-03-20
1998-03-20
1998-03-20
1998-03-23
1998-03-23
1998-03-23
1998-03-24
1998-03-24
1998-03-24
1998-03-24
1998-03-25
1998-03-25
1998-03-25
1998-03-26
1998-03-26
1998-03-26
1998-03-27
1998-03-27
1998-03-27
1998-03-27
1998-03-30
1998-03-30
1998-03-30
1998-03-31
1998-03-31
1998-03-31
1998-04-01
1998-04-01
1998-04-01
1998-04-01
1998-04-02
1998-04-02
1998-04-02
1998-04-03
1998-04-03
1998-04-03
1998-04-06
1998-04-06
1998-04-06
1998-04-06
1998-04-07
1998-04-07
1998-04-07
1998-04-08
1998-04-08
1998-04-08
1998-04-09
1998-04-09
1998-04-09
1998-04-09
1998-04-10
1998-04-10
1998-04-10
1998-04-13
1998-04-13
1998-04-13
1998-04-14
1998-04-14
1998-04-14
1998-04-14
1998-04-15
1998-04-15
1998-04-15
1998-04-16
1998-04-16
1998-04-16
1998-04-17
1998-04-17
1998-04-17
1998-04-17
1998-04-20
1998-04-20
1998-04-20
1998-04-21
1998-04-21
1998-04-21
1998-04-22
1998-04-22
1998-04-22
1998-04-22
1998-04-23
1998-04-23
1998-04-23
1998-04-24
1998-04-24
1998-04-24
1998-04-27
1998-04-27
1998-04-27
1998-04-27
1998-04-28
1998-04-28
1998-04-28
1998-04-29
1998-04-29
1998-04-29
1998-04-30
1998-04-30
1998-04-30
1998-04-30
1998-05-01
1998-05-01
1998-05-01
1998-05-04
1998-05-04
1998-05-04
1998-05-05
1998-05-05
1998-05-05
1998-05-05
1998-05-06
1998-05-06
1998-05-06
1998-05-06
참고

Mingg`s Diary
밍구
공부 목적 블로그