Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a list box containing "Weeks" which I used the script:
"(WeekStart("RE_DAY"))&'-'& Day(WeekEnd("RE_DAY"))&' Week'& Week("RE_DAY") as Weks.
It shows weeks from 1 to 52
How can I make it to show Week1 to Week4 or Week5 for every month? and how can I remove the "- Week" text in the list box?
A quick search found this :
'Week'&Ceil(Day(Date)/7) as MonthlyWeek
Hi,
It seems there is some null values in the date field thats why you get - n the Week field. That why you get nothing in the week field you can check in the "RE_DAY" field.
You can try also
=If( Len(Day(WeekStart("RE_DAY"))) >0, Day(WeekStart("RE_DAY")) ) &'-'&
If( Len(Day(WeekEnd("RE_DAY"))) > 0, Day(WeekEnd("RE_DAY"))) &' Week'& Week("RE_DAY") as Weks
But i recommend check the RE_DAY field for null values.
Regards
Anand
Hi Anand
Thanks for your rep;ly. The RE_DAY field does indeed contain NULL values, so it makes sense now.
I applied your script and I still get weeks in (1-52). I think the "Week" function is not an option here as I would like to see every month's weeks as Week1, Week2, Week3, Week4. Is there any fuction that can give me that?
A quick search found this :
'Week'&Ceil(Day(Date)/7) as MonthlyWeek
Thanks Bill , That works perfectly. Thank you too Anand
Hi,
You can try this way also
'Week'&Ceil(Day("RE_DAY")/7) &' - '&Month("RE_DAY") as MonthlyWeekField
Regards
Anand
I'm getting duplicates for some dates with different week numbers
Any idea why I'm getting this?
Can you post sample app