일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- Oracle
- 마이바티스
- 필터체인
- 알고리즘
- 설정
- html
- 깃허브
- SESSION
- 스프링
- 이클립스
- 설치
- jsp
- 버튼
- 깃허브 간단요약
- EL태그
- 오라클
- 면접
- jsp 내부객체
- 셋업
- jstl
- MySQL
- 자바
- jquery
- 제이쿼리
- Eclipse
- Spring
- java
- 자바스크립트
- springboot
- 폼태그
- Today
- Total
은은하게 코드 뿌시기
MYSQL 시간표현 방식, DATE_FORMAT() FORMAT 본문
unit ValueExpected expr Format
MICROSECOND | MICROSECONDS |
SECOND | SECONDS |
MINUTE | MINUTES |
HOUR | HOURS |
DAY | DAYS |
WEEK | WEEKS |
MONTH | MONTHS |
QUARTER | QUARTERS |
YEAR | YEARS |
SECOND_MICROSECOND | 'SECONDS.MICROSECONDS' |
MINUTE_MICROSECOND | 'MINUTES:SECONDS.MICROSECONDS' |
MINUTE_SECOND | 'MINUTES:SECONDS' |
HOUR_MICROSECOND | 'HOURS:MINUTES:SECONDS.MICROSECONDS' |
HOUR_SECOND | 'HOURS:MINUTES:SECONDS' |
HOUR_MINUTE | 'HOURS:MINUTES' |
DAY_MICROSECOND | 'DAYS HOURS:MINUTES:SECONDS.MICROSECONDS' |
DAY_SECOND | 'DAYS HOURS:MINUTES:SECONDS' |
DAY_MINUTE | 'DAYS HOURS:MINUTES' |
DAY_HOUR | 'DAYS HOURS' |
YEAR_MONTH | 'YEARS-MONTHS' |
참고 : https://dev.mysql.com/doc/refman/8.0/en/expressions.html#temporal-intervals
MySQL :: MySQL 8.0 Reference Manual :: 9.5 Expressions
This section lists the grammar rules that expressions must follow in MySQL and provides additional information about the types of terms that may appear in expressions. The following grammar rules define expression syntax in MySQL. The grammar shown here is
dev.mysql.com
DATE_FORMAT() Function FORMAT
FormatDescription
%a | Abbreviated weekday name (Sun to Sat) |
%b | Abbreviated month name (Jan to Dec) |
%c | Numeric month name (0 to 12) |
%D | Day of the month as a numeric value, followed by suffix (1st, 2nd, 3rd, ...) |
%d | Day of the month as a numeric value (01 to 31) |
%e | Day of the month as a numeric value (0 to 31) |
%f | Microseconds (000000 to 999999) |
%H | Hour (00 to 23) |
%h | Hour (00 to 12) |
%I | Hour (00 to 12) |
%i | Minutes (00 to 59) |
%j | Day of the year (001 to 366) |
%k | Hour (0 to 23) |
%l | Hour (1 to 12) |
%M | Month name in full (January to December) |
%m | Month name as a numeric value (00 to 12) |
%p | AM or PM |
%r | Time in 12 hour AM or PM format (hh:mm:ss AM/PM) |
%S | Seconds (00 to 59) |
%s | Seconds (00 to 59) |
%T | Time in 24 hour format (hh:mm:ss) |
%U | Week where Sunday is the first day of the week (00 to 53) |
%u | Week where Monday is the first day of the week (00 to 53) |
%V | Week where Sunday is the first day of the week (01 to 53). Used with %X |
%v | Week where Monday is the first day of the week (01 to 53). Used with %x |
%W | Weekday name in full (Sunday to Saturday) |
%w | Day of the week where Sunday=0 and Saturday=6 |
%X | Year for the week where Sunday is the first day of the week. Used with %V |
%x | Year for the week where Monday is the first day of the week. Used with %v |
%Y | Year as a numeric, 4-digit value |
%y | Year as a numeric, 2-digit value |
참고 : https://www.w3schools.com/sql/func_mysql_date_format.asp
MySQL DATE_FORMAT() Function
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
'Database -Mysql,Oracle' 카테고리의 다른 글
my sql AI , Auto_increment 값 초기화 하기 (0) | 2022.07.01 |
---|---|
오라클/MYSQL 함수 종류 비교 (0) | 2022.06.29 |
my sql db복사 /스키마 복사/ 테이블 복사/ db이름바꾸기 (0) | 2022.06.29 |
MYSQL 문자열 컬럼일때 숫자 정렬 오류 TIP (0) | 2022.06.24 |
MY SQL / ECLIPSE 연결하기 연동 (0) | 2022.06.24 |