Common SQL time Format the default date field for the Chinese version of SQL Server datetime format is yyyy-mm-DD Thh:mm:ss.mmm For example:Selectgetdate ()2004- the- A One: .:08.177This is used to transfer data between databases or to be accustomed to the Oracle date format yyyy-mm-DD HH24:MI:SS The number of people is somewhat inconvenient. I've tidied up the date format conversion methods that you might often use in SQL Server: examples are:SelectCONVERT (varchar, GETDATE (), - )2004- the- A One: .: ,SelectReplace (replace (varchar, GETDATE (), -),'-',"'),' ',"'),':',"')20040912110608SelectCONVERT (varchar ( A), GETDATE (),111 )2004/ the/ ASelectCONVERT (varchar ( A), GETDATE (), the )20040912SelectCONVERT (varchar ( A), GETDATE (),102 )2004.09. Aother date format conversion methods that I don't use:SelectCONVERT (varchar ( A), GETDATE (),101 ) the/ A/2004SelectCONVERT (varchar ( A), GETDATE (),103 ) A/ the/2004SelectCONVERT (varchar ( A), GETDATE (),104 )12.09.2004SelectCONVERT (varchar ( A), GETDATE (), the ) A- the-2004SelectCONVERT (varchar ( A), GETDATE (),106 ) A the 2004SelectCONVERT (varchar ( A), GETDATE (),107 ) the A,2004SelectCONVERT (varchar ( A), GETDATE (),108 ) One: .: ,SelectCONVERT (varchar ( A), GETDATE (),109 ) the A 2004 1SelectCONVERT (varchar ( A), GETDATE (), the ) the- A-2004SelectCONVERT (varchar ( A), GETDATE (),113 ) A the 2004 1
The default date field for SQL Server Chinese version is the datetime format yyyy-mm-d