Convert strings into numbers and dates in SQL Server using the PARSE and TRY_PARSE functions

preview_player
Показать описание
In this video, we'll look at the PARSE and TRY_PARSE functions, and see how they can be used to convert currencies and dates from other countries.
My SQL Server Udemy courses are:
----
Using my English computer, I could convert a string which represents an English date (such as '3 April 2023') to a date type.
However, I couldn't do that for a Spanish date such as '3 Avril 2023'.
When you have international dates and numbers, then you can use PARSE and TRY_PARSE to select which locale (language and country) the data is in.
Рекомендации по теме
Комментарии
Автор

Excellent explanation! Helped me a lot

henriquedosprazeresmarceli
Автор

Thank you very much..
I was practicing sql queries and I was getting problems because I had my date as varchar datatype and was trying to convert it into date using cast and convert. And I was getting crazy because for one dataset it worked but for another it didn't and I couldn't understand the problem.
Thank you very much for this explanation.

pdd
Автор

Thank you for your simple and clear explanation

taibabs
welcome to shbcf.ru