Hi i'm grabbing a column value "[Date of Birth]" but i only would like the year of it, is there a way to somehow truncate the return of the 'datetime' field ?
something like:
Convert(getDate(YYYY), [Date of Birth]) as dob
select datename(year, [Date Of Birth])
Select DatePart(year, [Date Of Birth])
Select Year([Date Of Birth])
Select Convert(VarChar(4), [Date Of Birth], 121)
-George
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.