📅  最后修改于: 2022-03-11 15:05:03.434000             🧑  作者: Mango
-- Create test case
DECLARE @myDateTime DATETIME
SET @myDateTime = '2008-05-03'
-- Convert string
SELECT LEFT(CONVERT(VARCHAR, @myDateTime, 120), 10)