I have been asked to insert the following into an Access query. It is not working the way the user states that it should and I would like to know if someone could break it down for me and explain what I should expect to see in my query results based on the below function.
ORGACWEEK: Int(([ORGAC_DATE]-"20100101")/7)*7+"20100101"
The field 'ORGAC_DATE' is a date field formatted mm/dd/yyyy
The function in the query should return "ORGACWEEK" always as a Sunday. They are telling me it is working in other Access queries but I can't get it to work and don't see how it is calculating on a Sunday only. Any help would be appreciated.
What I am getting is i.e. ORGAC_DATE 10/15/2010, ORGACWEEK is coming back as 10/9/10 and should be 10/10/10
Also, if it helps, this works in Excel and returns the correct date, I just don't know how.
=INT((K2-"01/01/06")/7)*7+"01/01/06"
Thanks,
Toni