I'm literally pulling my hair out trying to use the FORMAT function to format a date into a simple string. Please someone pull the pin and tell me what stupid thing I'm missing!
Works:
SELECT TOP 10 FORMAT(REV_DATE_INSERTED, 'MMMM dd, yyyy') AS VARCHAR FROM REV ORDER BY REV_ID DESC
Works:
SELECT TOP 10 'Posted on ' + FORMAT(REV_DATE_INSERTED, 'MMMM dd, yyyy') AS VARCHAR FROM REV ORDER BY REV_ID DESC
Does NOT Work:
SELECT TOP 10 'Posted on ' + FORMAT(REV_DATE_INSERTED, 'MMMM dd, yyyy') AS VARCHAR + CHAR(13) + CHAR(10) FROM REV ORDER BY REV_ID DESC
I can't figure out how to simply concat a string onto the end of the output of FORMAT.