일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- String Functions and Operators
- String Function and Operators
- 전자정부표준프레임워크
- 방화벽
- MySQL
- Data and Time Functions
- Date and Time Function
- String Functions and Date Operators
- Oracle
- HTTP
- Date and Time Functions
- 티베로
- 윈도우
- 전자정부 표준프레임워크
- Sring Functions and Operators
- 오라클
- Tibero
- SVN
- Today
- Total
웹이야기
MySQL FROM_UNIXTIME() 본문
MySQL 날짜함수, 시간함수
FROM_UNIXTIME()
- unix_timestamp 를 날짜로 바꿔준다라고 보면 되겠다.
- UNIX_TIMESTAMP() 와 반대의 개념
FROM_UNIXTIME(unix_timestamp[, format])
의 형태
Returns a representation of the unix_timestamp argument as a value in 'YYYY-MM-DD hh:mm:ss' or YYYYMMDDhhmmss format, depending on whether the function is used in a string or numeric context. unix_timestamp is an internal timestamp value representing seconds since '1970-01-01 00:00:00' UTC, such as produced by the UNIX_TIMESTAMP() function.
mysql> SELECT FROM_UNIXTIME(1447430881);
+---------------------------+
| FROM_UNIXTIME(1447430881) |
+---------------------------+
| 2015-11-14 01:08:01 |
+---------------------------+
1 row in set (0.00 sec)
mysql> SELECT FROM_UNIXTIME(1447430881)+0 ;
+-----------------------------+
| FROM_UNIXTIME(1447430881)+0 |
+-----------------------------+
| 20151114010801 |
+-----------------------------+
1 row in set (0.00 sec)
mysql> SELECT FROM_UNIXTIME(1447430881, ' %Y %D %M %h:%i:%x %x');
+----------------------------------------------------+
| FROM_UNIXTIME(1447430881, ' %Y %D %M %h:%i:%x %x') |
+----------------------------------------------------+
| 2015 14th November 01:08:2015 2015 |
+----------------------------------------------------+
1 row in set (0.00 sec)
'D > MySQL' 카테고리의 다른 글
MySQL HOUR() (0) | 2020.04.02 |
---|---|
MySQL GET_FORMAT() (0) | 2020.04.02 |
MySQL FROM_DAYS() (0) | 2020.04.01 |
MySQL EXTRACT() (0) | 2020.04.01 |
MySQL DAYOFYEAR() (0) | 2020.04.01 |