我想要以下列格式输出datetime
列(SellDate
):
mm/dd/yyyy
,例如06/01/1998
我该怎么做?提前谢谢!
答案 0 :(得分:10)
将其转换为具有相应conversion style;
的字符串convert(varchar(10), thedatecol, 101)
答案 1 :(得分:0)
以DD / MM / YYYY获取日期 转换(varchar(10),TransactionDateTime,103) 输出: 2018年1月7日