Closed. This question needs to be more focused . It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post .
Closed last year.
This post was edited and submitted for review last year and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
We have DOB = '01/12/1997' and Quarter = '2' and Year ='2020' and I want the list of employee whose age is 50 in 2nd quarter of year '2020'. How can i get this in SQL server.
ID Name DOB 1 John 1982-01-09 00:00:00 2 Sally 1990-05-20 00:00:00 3 Adam 1997-12-01 00:00:00
1条答案
按热度按时间cigdeys31#
Using
DATЕDD()
andDATEPART()
is an option:Result: