Contents

System/OS
2013.04.23 12:23

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

Views 11682 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
204 System/OS 개인적으로 쓰고 있는 bash_profile hooni 2015.01.16 1999
203 System/OS [mac] 패키지 매니저, MacPort hooni 2015.01.03 2136
202 System/OS [svn] Can't convert string from native encoding to 'UTF-8' 메시지가 나오는 경우 hooni 2014.12.18 2195
201 System/OS [linux] yum 업데이트 시 커널 제외하기 hooni 2014.09.11 2313
200 System/OS [mac] Mac OS 패키지 매니저, HomeBrew file hooni 2015.01.03 2545
199 System/OS [svn] SVN trunk 변경사항 되돌리기 (SVN Rollback) hooni 2014.11.27 2605
198 System/OS [svn] 하나의 SVN에서 멀티 저장소 (One svnserve, multiple repositories) hooni 2015.01.02 2623
197 System/OS [mac] How to uninstall MySQL on Mac OS. hooni 2017.11.08 2629
196 System/OS [virtualbox] VirtualBox에 Ubuntu 설치하기 file hooni 2019.11.22 2640
195 System/OS [mac] Homebrew/rvm/cocoapod setting hooni 2017.07.29 2644
194 System/OS [linux] iptables 초간단 세팅 스크립트 hooni 2017.09.26 2692
193 System/OS [linux] CentOS 에 APM 설치하기 hooni 2015.01.02 2974
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17