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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -