First day of this month

Jmnote (토론 | 기여)님의 2014년 11월 20일 (목) 01:50 판 (새 문서: category: Date ==개요== ;first day of this month ;first_of_this_month ==Bash== category: Bash <source lang='bash'> FIRST_OF_MONTH=`date +%Y-%m-01` echo $FIRST_OF_MONTH </so...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요

first day of this month
first_of_this_month

2 Bash

FIRST_OF_MONTH=`date +%Y-%m-01`
echo $FIRST_OF_MONTH

3 PHP

$first_day = date("Y-m-d", strtotime(date('Y-m').'-01'));

4 SQL

4.1 MySQL

SELECT CONCAT(SUBSTR(CURDATE(),1,8),"01");

5 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}