Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Convertion Error

$
0
0
DECLARE @A DATETIME
SET @A= CONVERT(DATETIME, '01/' + CONVERT(VARCHAR,YEAR(GETDATE())),120)
SELECT @A

Am getting the conversion error:

Msg 241, Level 16, State 1, Line 2
Conversion failed when converting date and/or time from character string.


bala krishna


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>