Boring as it may, this is how you do it:
SELECT dateadd(WEEK, 4,
dateadd(Month, 6,
dateadd(YEAR, 64, '1957-02-23 00:00:00.000')))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi- I have to add no. of month and no. of week in the following 2nd and 3rd query to get the result.
SELECT DateADD(DD, -0 , DateADD(YEAR, +64.0, '1957-02-23 00:00:00.000'))
SELECT DateADD(DD, -0 , DateADD(YEAR, +64, '1957-02-23 00:00:00.000')) + month (6)
SELECT DateADD(DD, -0 , DateADD(YEAR, +64, '1957-02-23 00:00:00.000')) + month (6) + week (4)
Expected result for adding 64 yr: 2021-02-23
Expected result for adding 64 yr+ six month: 2021-08-23
Expected result for adding 64 yr+ six month + four weeks: 2021-09-23 approx
Boring as it may, this is how you do it:
SELECT dateadd(WEEK, 4,
dateadd(Month, 6,
dateadd(YEAR, 64, '1957-02-23 00:00:00.000')))
Hi @Kenny Gua ,
2021-08-23 00:00:00.000:
SELECT dateadd(MONTH, 6,
dateadd(YEAR, 64, '1957-02-23 00:00:00.000'))
2021-09-20 00:00:00.000:
SELECT dateadd(WEEK, 4,
dateadd(Month, 6,
dateadd(YEAR, 64, '1957-02-23 00:00:00.000')))
-------------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.