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
132 System/OS [mac] Mac OS 패키지 매니저, HomeBrew file hooni 2015.01.03 2546
131 System/OS [mac] How to uninstall MySQL on Mac OS. hooni 2017.11.08 2632
130 System/OS [mac] Homebrew/rvm/cocoapod setting hooni 2017.07.29 2647
129 System/OS [mac] Charlesproxy 간단한 설정 내용~ hooni 2013.11.12 13262
128 System/OS [macos] How to Fix ‘You Shut Down Your Computer Because of a Problem’ file hooni 2022.06.01 4513
127 System/OS [linux] 한글 URL 인식할 수 있게 아파치(Apache) 설정 (mod_url.c 설치) hooni 2013.04.23 13966
126 System/OS [linux] 프로세스의 stat 상태에 대한 설명 hooni 2013.04.23 11887
125 System/OS [linux] 프로세스 상태확인(ps) hooni 2003.04.23 13544
124 System/OS [linux] 프로그램 설치방법 (내공쌓기) hooni 2003.04.23 14240
123 System/OS [linux] 패킷의 소스 주소 바꾸기 hooni 2003.04.23 19535
122 System/OS [linux] 패킷 스니퍼링 hooni 2003.04.23 17182
121 System/OS [linux] 파일내 문자열 찾아 바꾸기 hooni 2013.04.23 13297
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 17 Next
/ 17