Difference between CONVERT and CAST
Is there any difference between CONVERT and CAST including performance issues?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Amira BedhiafiRank #601 · 4K reputationPosted Apr 19, 2021, 5:47 AM EDT
CONVERT is SQL Server specific,
CASTis ANSI.CONVERT is known as more flexible when it comes to formatting dates for example.
They are pretty much the same.
With CAST, you indicate the expression and the target type; with CONVERT, there’s a third argument representing the style for the conversion, which is supported for some conversions, like between character strings and date and time values.
Which one is faster?
Only the query plan can tell you about it.
But,
You should know that the performance differences between
CASTandCONVERTare negligible.