Forum Discussion

rtiwari's avatar
rtiwari
Frequent Visitor
3 years ago
Solved

Custom Weeks for Seasonal Events

Dear Community Members,   Requesting your help on creating custom weeks for seasonal events that happens in different months in different years.    The data has "Registration Dates' and 'Years- S...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi rtiwari,

    If you only consider with specific days instead of fact week numbers, I'd like to suggest you use DATEDIFF function to calculate get diff days from start date, end date and divide with period number(7) to get custom week number.

    After these steps, you can use a number with MOD function to process with above result week number to convert them into the ranges.

    Notice: the start date, end date may across many years will get a number over year week numbers limits, mod function will help convert them into the available range.

    Regards,

    Xiaoxin Sheng