The text of this article is not in this database — only its details are. Read it on the old site: Cast() and Convert() Functions in SQL Server
15 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Cast() and Convert() Functions in SQL Server
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Sridhar YelagandhulaPosted May 14, 2021, 8:54 AM
Nice it's helpful.
Binod KumarPosted Apr 9, 2019, 4:51 AM
Great Acticle
Amol KumbhkarnaPosted May 27, 2018, 1:19 AM
Great Article...Thanks For Sharing It..
SubashPosted Sep 16, 2016, 12:32 AM
Good one sir
kalu singh raoPosted Jul 3, 2016, 9:02 AM
Nice...
soundara rajanPosted Oct 28, 2014, 6:21 AM
very useful RK thanks...
Abhishek JaiswalPosted Jun 29, 2014, 9:40 AM
That's what I was looking for!
kanti khairaliyaPosted Mar 27, 2014, 6:29 AM
good article
ermenegildoPosted Oct 16, 2013, 6:49 PM
Muy bien pero quisiera saber como se realiza un traiger o disparador en un servido sql server gracias
Manish DwivediPosted Jul 16, 2013, 12:38 AM
In the above example suppose @A have value like 'sa' and then we try to cast it as int. Rohtash tell me how will we handle this situation or error.
Rohatash KumarPosted Jul 15, 2013, 11:54 PM
Thanks mike.
Rohatash KumarPosted Jul 15, 2013, 11:52 PM
Geoffrey, some time We need different date formats. You can also use your own date format in place of the getdate() function.
Geoffrey AshnaPosted Jul 15, 2013, 2:46 PM
I have a quick question in regards to the convert function that Rohatash has demonstrated. Why would it be necessary to convert a getdate(), 107 to a varchar(20). Does it provide any significance or was the purpose was just for pure example. By the way, this is an excellent post, just wanted to know on the varchar(20 for the convert function.
Mike MikePosted Dec 16, 2012, 2:21 PM
In my opinion, Rohatash Kumar's article is the best.