Sql dates

Hi.
I want to find the date a year ago (- 365 days) based on the date today.
How do I do that?

kv
Oli
tolvudeild-VSAsked:
Who is Participating?
 
momi_sabagConnect With a Mentor Commented:
select current date - 1 year
from ....
0
 
maggiec58Commented:
You want to use year instead of 365 (leap year)
dateadd(yy,-1,getdate())
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.