mysql - How to insert just year and month into date field? -
i have column called table_date
using now()
insert current date (2011-02-23
). know can manipulate sql/php show me year , monthname. however, want know if it's possible insert table_date
current date year-month 2011-02
? thanks
a date
field going full date, , far know, required specify full date.
it might easiest use 01
, 2011-02-01
february 2011.
obviously, can format output of date
field liking when querying it:
select date_format(fieldname,"%y-%m");
Comments
Post a Comment