I am trying to get week number for today
As of today, the CurrDate() return is 2023-03-15
But this function Week_GetWeekDayByDate(CurrDate()) is returning 3
What is the correct input for today's date?
Hi Jonathan,
CurrDate() is correct input for today.
Week_GetWeekNumberByDate( 0, CurrDate()) can be used to get the week number.
0 is basically for sunday and 6 will be Saturday. First input of function is basically first day of week.
Cheers
Hi ,
you need to use Week_GetWeekNumberByDate() function for Get week number given date .
Hi you may try this forge component
https://www.outsystems.com/forge/component-overview/14559/week-number-of-month-and-year
Regrds
Sanjay
Hi Jonathan Chan,
Return value 0 for Sunday to 6 for Saturday
Thanks,
Ramesh
Still something is fishy with it, or I don't understand how it works. But somehow,
(Week_GetWeekNumberByDate(0,TextToDate("31-12-2023")) is "1" (31-12-2023 is a sunday)