how can I change the Date format form YYYY-MM-DD to DD-MM-YYYY ? I tried this command:
select CONVERT(varchar(10), @date, 101)
but it did not work. Can anyone help me?
Thanks!
how can I change the Date format form YYYY-MM-DD to DD-MM-YYYY ? I tried this command:
select CONVERT(varchar(10), @date, 101)
but it did not work. Can anyone help me?
Thanks!
DECLARE @Param1 DATE
SET @Param1 = '2018-01-31' -- YYYY-MM-DD
SELECT CONVERT(VARCHAR(10),@Param1,105) AS DesiredDate -- DD-MM-YYYY