sql - How to select previous month in mysql with variable? -
this question has answer here:
- mysql: query rows previous month 9 answers
$m=01 $y=2016
given month, how find value of previous month? (in example: december 2015)
select convert(varchar,dateadd(d,-(day(getdate())),getdate()),106)
Comments
Post a Comment