Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 워드프레스한글팩
- ssmtp
- php-fpm
- php
- 이미지주소추출
- 쁘띠프랑스
- 앞으로 가기
- node.js
- 태권브이
- no key alg
- node 이미지 저장
- 외래키
- strtotime
- 태권v
- 중독 게임
- set foreign_key
- 뒤로 가기
- MySQL
- openfire
- security.limit_extensions
- xcache
- rsync
- 리플리케이션 오류
- quota
- 날짜계산
- 특정 패키지 업데이트 중지 / 해제
- 재귀쿼리
- 훼인
- simplexml_load_filesimplexml
- mongodb
Archives
- Today
- Total
일상 기록 창고
현재 날짜의 주차 구하기 본문
한 주의 시작을 월요일 기준으로 해서 계산
1. 현재 날짜의 주차를 구한다.
2. 현재 달의 1일의 주차를 구한다.
3. (1) - (2) + 1 로 주차 계산
SELECT WEEK( '2017-07-28', 5 ) - WEEK( '2017-07-01', 5 ) + 1 |
'프로그래밍 > mysql' 카테고리의 다른 글
Slave SQL: If a crash happens this configuration does not guarantee that the relay log info will be consis (0) | 2019.05.29 |
---|---|
Specified key was too long; max key length is 767 bytes (0) | 2018.05.04 |
우분투에서 mysql apt 설치 후 데이터 디렉토리 옮기기 (0) | 2016.05.29 |
16.04 에 mysql 5.7x 버전 설치 깔끔하게 지우기. (0) | 2016.05.29 |
우분투 16.04 설치 후 mariadb-server-10.0 설치 후 로그인 오류 (0) | 2016.05.19 |