Get Current Week Number From Date Picker Field

I used sharepoint 2013, I try get current week number from date picker field.

I try do that by JavaScript but I cant , I modified list in sharepoint designer, place JS under PlaceHolerMain in NewForm.aspx but I cant find textBox Id in this page!!!

Now I want achieve by sharepoint calculated field. 

please advice me to solve my problem.

thanks.



  • Edited by Hoorie 3 hours 34 minutes ago
September 7th, 2014 3:42am

Hi,

You can achieve this by calculated field.  The following is the formula.

=INT(([StartDate]-DATE(YEAR([StartDate]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([StartDate]),1,1)),d)))/7)+1

Please mark it as answered, if your problem resolved.


Free Windows Admin Tool Kit Click here and download it now
September 7th, 2014 3:46am

thank you Mokhtar. 

I Create StartDate as date field and WeekNo as calculated field. 

formula dosent work!

September 7th, 2014 4:12am

Hi,

Are you using this formula.

=INT(([StartDate]-DATE(YEAR([StartDate]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([StartDate]),1,1)),d)))/7)+1

It is working as expected, tested.  The following are results.

Please mark it answered, if your problem resolved.

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2014 4:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics