Contents

System/OS
2013.04.23 12:23

[mysql] 시간 관련 SQL구문..

Views 10773 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
현재 시간을 타임스템프로 출력하는 구문
select now();
select unix_timestamp();

현재 시간을 년-월-일 시간으로 출력하는 구문
select sysdate();

현재 시간을 년월일시.. 모두 붙여서 출력하는 구문
select now()+0;


예를 들어..

select substring(now(), 0, 4);
이 구문을 쓰면 타임스템프의 앞부분 4자리를 가져오지만..

select substring(now()+0, 0, 4);
이 구문을 쓰면 4자리 현재 년도를 가져오게 된다.


?

List of Articles
No. Category Subject Author Date Views
154 System/OS [windows] 98/ME 속도 빠르게 튜닝(부팅,메모리,레지스터) hooni 2003.04.23 50439
153 System/OS [windows] 도스 사용 팁 hooni 2003.04.23 17806
152 System/OS [windows] 여러가지 활용 팁 hooni 2003.04.23 19969
151 System/OS [windows] 배치(bat)파일 제작 방법 hooni 2003.04.23 17002
150 System/OS [linux] 패킷 스니퍼링 hooni 2003.04.23 16315
149 System/OS [linux] 패킷의 소스 주소 바꾸기 hooni 2003.04.23 18784
148 System/OS [linux] iptables 명령어 매뉴얼(options) hooni 2003.04.23 11333
147 System/OS [linux] 간단한 NAT 설정 script hooni 2003.04.23 12597
146 System/OS [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. hooni 2003.04.23 14732
145 System/OS [linux] apache, php, jsp 환경설정하기.. hooni 2003.04.23 15232
144 System/OS [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd hooni 2003.04.23 32452
143 System/OS [linux] 특수문자 환경 설정(stty) hooni 2003.04.23 15275
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17