Page 1 of 1

[Solved] Changing Counter Start Value

PostPosted: Tue Aug 07, 2012 11:23 pm
by One Big Yawn
I would like to assign each weekly report a sequential number based on the week it is produced (which will be generated based on parameters of beginning and end of the week, as there may be slight variation based on holidays). Our fiscal year begins June 1st, so it makes sense for that to be report 01.

Is there anyway to reset the counter based on the date? I thought I could use some sort of WEEK function, but this doesn't seem available in Base. :mrgreen:


Re: Changing Counter Start Value

PostPosted: Wed Aug 08, 2012 11:08 am
by eremmel
Just a simple approach might be: populate a table with from/to dates and the week number. Use in the query the current_date to find the correct report/week number.