For eg. i am having filename_07 where 07 is week number, i have to get monday date of that week number. Can anyone please help.
Try this approach, it helps to calculate the weeknumber monday date
Main.xaml (10.7 KB)
Mark it as solution if it helps
Thanks & Regards,
Hi @NIVED_NAMBIAR , Thank you for sharing the workflow. it is working for Present year. But for eg. If the week number is 52 of 2022, if i am executing in 1st week of 2023 then the date which i will get will be the december last week monday date of 2023. But i should get 2022’s 52 week monday date. Can you please help on this.
Ok actually current code will work for that year
Let me try to modify the code according to ur reqd
Hi @NIVED_NAMBIAR, Thank you so much, it would be really helpful.
May be i am confused in between, how u are calculating it, i think u are taking week number and based on current year u are calculating the monday day, are u taking year as well,
could u explain how the process is?
Hi @NIVED_NAMBIAR, The process is there will be ONLY week number, i should get the monday date of that specific week number(dd/MM/yyyy). If that week number is the last week number(52) of the previous year i should get the monday date of that week number if i am executing in the first week of new year.
Based on the current date u are executing right ?
If it scheduled on Tuesday(weekly), it will execute on that day but week number can be anything in the filename( for eg. filename_07, here 07 is weeknumber). based on mentioned week number it should get the monday date. If week number belong to previous year last week, it should get that week numbers monday date.
can give a try to the below code:
Cdate("01/01/" & intYear).AddDays(-(Cint(Cdate("01/01/" & intYear).DayOfWeek) + 6)).AddDays(intWeekNumber*7)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.