Forum Discussion
difference between two dates in weeks
- Anonymous8 years ago
Almost correct
this is the correct formula that works
Column =
VAR __dec31 = DATE([Req. Del. Year],12,31)
VAR __weeks = [Req. Del. Week]-[Creation Week]
RETURN
IF(
[Creation Week] > [Req. Del. Week],
WEEKNUM(__dec31) -[Creation Week]+ [Req. Del. Week],
__weeks
)but thank you very much without you I would not able to finish it..
ok thats a good start but how to deal with the fact that each year has a different number of weeks..
Try this:
Column =
VAR __dec31 = DATE([Req. Del. Year],12,31) VAR __weeks = [Creation Week] - [Req. Del. Week] RETURN IF( [Req. Del. Week] > [Creation Week], WEEKNUM(__dec31) + __weeks + [Creation Week], __weeks )
- Anonymous8 years agoNot applicable
Almost correct
this is the correct formula that works
Column =
VAR __dec31 = DATE([Req. Del. Year],12,31)
VAR __weeks = [Req. Del. Week]-[Creation Week]
RETURN
IF(
[Creation Week] > [Req. Del. Week],
WEEKNUM(__dec31) -[Creation Week]+ [Req. Del. Week],
__weeks
)but thank you very much without you I would not able to finish it..