Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Year function reteives different values

$
0
0

 
SELECT year(convert(date,'24-10-49',5)) --dd-mm-yy

--2049

SELECT year(convert(varchar(10),'24-10-49',5)) --dd-mm-yy

--2049

SELECT year(convert(date,'24-10-50',5)) --dd-mm-yy

--1950

SELECT year(convert(varchar(10),'24-10-50',5)) --dd-mm-yy

--1950

Do we have any range for year function or do SQL server shows values to only limited period??


Viewing all articles
Browse latest Browse all 8428

Trending Articles



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