Click here to Skip to main content
16,019,957 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to pass third parameter ( year) as a variable to dateadd() method
for example
dateadd(ww,4,@year) instead of dateadd(ww,4,'2011') or can we use datepart() method in dateadd() method for separating year?
Posted
Updated 29-Jan-11 21:59pm
v2

1 solution

DATEADD (datepart , number , date ) includes 3 parameters.
If you want to add an year use YY in the datepart and pass the year (as int) as the second variable.


See here[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900