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
- isNotEmpty
- 자바
- mysql
- mssql
- 호이스팅
- oracle
- PostgreSQL
- Javascript
- git
- Kibana
- 명령어
- spring
- 티스토리챌린지
- docker
- iBatis
- isempty
- SQL
- DBMS
- Linux
- MongoDB
- MariaDB
- pandas
- 오블완
- 리눅스
- java
- IntelliJ
- pem
- analytics4
- Python
- github
Archives
- Today
- Total
hanker
PHP - 현재 날짜 가져오기 본문
반응형
//현재 연도 4자리
$thisYear = date("Y");
//ex) 2020
//현재 연도 2자리
$thisYear = date("y");
//ex) 20
//현재 월 (0포함 2자리)
$thisMonth = date("m");
//ex) 01 ~ 12
//현재 월 (0제외)
$thisMonth = date("n");
//ex) 1 ~ 12
//현재 일 (0포함 2자리)
$thisDay = date("d");
//ex) 01 ~ 31
//현재 일 (0제외)
$thisDay = date("j");
//ex) 1 ~ 31
반응형
'PHP' 카테고리의 다른 글
PHP - Controller 에서 Model에서 가공된 데이터 가져오기 (0) | 2020.09.23 |
---|---|
PHP - php 웹 프레임워크 tool (0) | 2020.09.23 |