1 개요[ | ]
- first day of this month
- first_of_this_month
- Returns the first day of this month
- void → YYYY-MM-01
- =first_day(today())
- =first_day(this_month())
2 Bash[ | ]
Bash
Copy
FIRST_OF_MONTH=`date +%Y-%m-01`
echo $FIRST_OF_MONTH
3 PHP[ | ]
PHP
Copy
$first_day = date("Y-m-d", strtotime(date('Y-m').'-01'));
4 SQL[ | ]
4.1 MySQL[ | ]
sql
Copy
SELECT CONCAT(SUBSTR(CURDATE(),1,8),"01");