## year,month,day
### 说明
| 函数 | 说明 |
| --- | --- |
| year(date) | 返回日期date的年份(1000~9999) |
| month(date) | 返回日期date的月份(1-12) |
| day(date) | 返回日期date的号数(1-31) |
### 例子:查询宝宝月龄
```sql
SELECT
id,
baby_name,
baby_birthday,
(YEAR (now()) - YEAR (baby_birthday)) * 12 + (MONTH (now()) - MONTH (baby_birthday)) AS baby_monthage
FROM
baby;
```