年份=Year(A2)月份=Month(A2)如果想显示年-月的格式,如2016-12,则这样写公式=Year(A2)&"-"&Month(A2)
year和montha1是日期=year(A1) ,=MONTH(a1)