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
- Javascript
- 넥사크로
- DBMS
- 후기
- docker
- 독서
- 책
- PostgreSQL
- IntelliJ
- spring
- git
- SQL
- springboot
- 오블완
- java
- 인덱스
- Python
- 책추천
- 티스토리챌린지
- MariaDB
- github
- mysql
- oracle
- 네트워크
- 명령어
- 리눅스
- pandas
- 인터페이스
- Linux
- mssql
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 |