211
213
create table t1 (d date, dt datetime, t timestamp, c char(10));
212
214
insert into t1 values ("0000-00-00", "0000-00-00", "0000-00-00", "0000-00-00");
213
216
select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear(c) from t1;
214
218
select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1;
215
220
select month("0000-00-00"),month(d),month(dt),month(t),month(c) from t1;
216
221
select quarter("0000-00-00"),quarter(d),quarter(dt),quarter(t),quarter(c) from t1;
217
222
select week("0000-00-00"),week(d),week(dt),week(t),week(c) from t1;