Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

No of Week according to Month formula modify

Topic Labels: Formulas
368 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello,

I use this formula to define the week number according to the month and it resets again starting the new month.
LPSD is my Licence Period start date

VALUE(DATETIME_FORMAT(LPSD,‘w’))-
VALUE(DATETIME_FORMAT(DATETIME_PARSE(‘01’&DATETIME_FORMAT(LPSD,‘MM’)&YEAR(LPSD),‘DDMMYYYY’),‘w’))+1

it’s giving me a wrong week no: week -47. when it’s week 5
Screen Shot 2020-12-02 at 3.39.50 PM

is there a slight modify can solve this?
thanks

1 Reply 1

This appears to be a bug in the Datetime_Format function. Just running this formula on dates December 27-31, 2020 results in a “1” when it should be “53”

DATETIME_FORMAT(Date,'w')