@manhnguyenv

Welcome to my blog!

MS Sql Server 2017

June 29, 2018 13:09

MS Sql Server 2017 (edit)

Format DateTime & Number

https://docs.microsoft.com/en-us/sql/t-sql/functions/format-transact-sql?view=sql-server-2017

DECLARE @d DATETIME = GETDATE();

SELECT FORMAT( @d, 'dd/MM/yyyy', 'en-US' ) AS 'DateTime Result'FORMAT(123456789,'###,###') AS 'Custom Number Result';

Categories