Azure SQL Database
An Azure relational database service.
5,147 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am converting Netezza queries to Azure and need help converting the following TO_CHAR statement...
SELECT DISTINCT
TDL.ORIG_SERVICE_DATE
, TO_CHAR(TDL.ORIG_SERVICE_DATE,'MM/01/YYYY')AS SERVICE_MMYY
TDL.ORIG_SERVICE_DATE pulls date and time stamp as
2022-03-30 00:00:00.000
In the Second Column (SERVICE_MMYY) I would like populate the following:
3/1/2022
I am unsure how to do this in Azure - your help is appreciated.
I think you may want :
FORMAT(TDL.ORIG_SERVICE_DATE,'M/1/yyyy') AS SERVICE_MMYY