Hi
In a date i want to add no of weeks .
Thanks
Hi
In a date i want to add no of weeks .
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Anandu G NathPosted Dec 27, 2023, 8:50 AM
Ramco RamcoPosted Mar 30, 2023, 12:58 PM
Hi Naimish
In below code i want to add 2 weeks to vsessiondate
Thanks
Rajkiran SwainPosted Mar 29, 2023, 8:11 PM
// Create a new date object
let date = new Date();
// Add 4 weeks (28 days) to the date object
date.setDate(date.getDate() + 28);
// Output the new date
console.log(date);
Naimish MakwanaPosted Mar 29, 2023, 10:43 AM
Hello Ramco,
Use this.
Thanks
Naimish Makwana
Sachin SinghPosted Mar 29, 2023, 8:19 AM
for sql
Ali BenchaabanPosted Mar 29, 2023, 7:51 AM
Hello Ramco,
You can use DATEADD() function to add weeks to DateTime in Sql Server. DATEADD() functions first parameter value can be week or wk or ww, all will return the same result.
*
BENCHAABAN Ali