I have a query for Oracle data which has TO_DATE('01-JAN-2017', 'DD-MON-YYYY')
in it. I need to run the same query on SQL Server, but I am facing a problem since the TO_DATE()
function is not available for T-SQL.
Can someone please help me with the equivalent of to_date() function which does the same as TO_DATE('01-JAN-2017', 'DD-MON-YYYY').
Original SQL query:
INSERT INTO LOC_CLOSING_MESSAGE
VALUES (2, 1, 'Store One.', TO_DATE('01-JAN-2017', 'DD-MON-YYYY'),
'TEST_USER', SYSDATE, 'TEST_USER', NULL)