选择单元格,单击右键,设置单元格格式选择"自定义""类型"输入yyyymmdd确定
如:2010-1-1 转换成20100101 及2010-01-01 均为文本格式=TEXT(YEAR(A1),"0000")&TEXT(MONTH(A1),"00")&TEXT(DAY(A1),"00") 或=TEXT(YEAR(A1),"0000")&"-"&TEXT(MONTH(A1),"00")&"-"&TEXT(DAY(A1),"00")