14
Views
2
Comments
Solved
Get weeknumber from a given date
Question
Application Type
Reactive
Service Studio Version
11.10.2 (Build 36428)

For two of my applications I need to calculate the weeknumber from a given date. I found the Extended DateTime forge component that has function I need. The only problem is that I can't use it on a mobile and reactive application. Is there a solution to calculate the weeknumber from a given date for those two application types without the need of a forge component or making a extension?

Quick example: 

Given date is 17-12-2020. Weeknumber should be 51 

Thanks in advance,

Bart

Rank: #68
Solution

Hi Bart,


You can use the Date Time Utils component, it has those functions for client and server side.

The component features a Demo and Try Now link where you can test your scenario and allows you to choose the first day of the week which impacts the calculus.


Hope it helps.


Regards,
João