Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a date field starting from 26-Nov-2009 . . . . etc.
I have a list box with field called "Week" but it shows actual week number from 48 49 50. . . etc
I want it as 1 2 3 .
How would I achieve this. ? Thanks in Advance
Ren
Hi
Sure. If the week numbers are based on a field or variable called baseDate:
=Week - week(baseDate) + If(Week >= week(baseDate), 1, 52)
(refactored slightly to reduce the calculations, but mathematically the same).
Jonathan
Hi
Assuming your start date is fixed, how about
=If(Week >=48, Week - 47, Week + 4)
Jonathan
hey dienst thanks for the solution.
your coding works perfectly, but is there any solution, if my date is not fixed.
Regards
ren
Hi
Sure. If the week numbers are based on a field or variable called baseDate:
=Week - week(baseDate) + If(Week >= week(baseDate), 1, 52)
(refactored slightly to reduce the calculations, but mathematically the same).
Jonathan
yes, when i used a variable it worked.
Thanks a lot.