原始 SQL 语句是:
The Original SQL Statement is:
SELECT SA.[RequestStartDate] as 'Service Start Date',
SA.[RequestEndDate] as 'Service End Date',
FROM
(......)SA
WHERE......
输出日期格式为 YYYY/MM/DD,但我希望输出日期格式为 DD/MM/YYYY.我如何修改此声明?
The output date format is YYYY/MM/DD, but I want the output date format is DD/MM/YYYY. How can I modify in this statement?
试试这个...
select CONVERT (varchar(10), getdate(), 103) AS [DD/MM/YYYY]
更多信息:http://www.sql-server-helper.com/tips/date-formats.aspx
这篇关于在 SQL SELECT 语句中更改日期格式(DD/MM/YYYY)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!