The above formula is an excel formula to calculate the position in a 28 day rotation. I need to use this information in a odbc query in order to select the correct record. Long story short I don't know how to put together the equivalent formula together to use in the query. Any help would be appreciated.

tougher problem than I thought I take it.