mikaelsnavy
11/20/2014 - 7:42 PM

Convert SQL DATETIME to superior human DATETIME

Convert SQL DATETIME to superior human DATETIME

SELECT 
  FORMAT(GETDATE(), 'g'),
	CONVERT(VARCHAR(32), CAST(GETDATE() AS DATE), 101) AS d,
	REPLACE(REPLACE(RIGHT(CAST(GETDATE() AS DATETIME), 7), 'AM', ' AM'), 'PM', ' PM') AS t