[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 567
  • Last Modified:

SQL Convert Date not working

I'm having an issue with converting a date from YYYY-MM-DD to DD/MM/YYYY. When I put CONVERT(date,sh.Order_Date,101), it still comes back as YYYY-MM-DD. I tried changing the style to 102, 103, 104, 105, etc. and it keeps returning the same format each time. The data type for OrderDate is datetime, so I'm not sure what the issue is. I even tried convert(date,cast(OrderDate as date),101) and got the same result. Can someone help me?
0
FVIAH
Asked:
FVIAH
1 Solution
 
tim_csCommented:
SELECT
   CONVERT(VARCHAR(10),sh.Order_Date,101)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now