1

I have a week number and a year, and I would like to calculate the date of the Monday of that week

e.g 14W19

14 represent the year of 2014 and W19 is the number of the week and i want to get the date of 05/05/2014 (Monday).

2
  • Something you want to show in a list? If you use 2013 this can be solved with JSLink, and probably in combination with moment.js (putting as comment as we don't know what version of SharePoint you use, or your approach). In moment.js it would probably be something like this: moment('14W19', 'YY{W}WW')
    – eirikb
    Commented Apr 25, 2014 at 8:14
  • Im using SPD 2010, I have a list which one of the field contains the information like 14W29(single text of line), actually I want to set a workflow for email triggering for it, i want to send an email to the user at monday if status is not equal to done for a particular item in the list when it is Monday on week 29, and send another email on Friday within the same week if the status still not equals to done, but i cannot set a specific date for the workflow.Can it be convert using the action "Do calculation" in the workflow?
    – YC91
    Commented Apr 29, 2014 at 8:31

1 Answer 1

0

You can add a Calculated Column to your SharePoint list of type DateTime and use a formula similar to this one (assuming the 14W19 value is stored in the Title field):

=DATE(2000+LEFT(Title,2),1,RIGHT(Title,2)*7-4-WEEKDAY(DATE(2000+LEFT(Title,2),1,1)))

You can validate if the resulting dates are Mondays adding a second calcualted column and using the

=WEEKDAY(mydate)

formula

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.