Hello All,
I have n number of documents in my database and sorted by year.
Many documents have same Item created on different dates. I would like to find out how many occurrences for this item in a year.
Ex: Document1 created on 31/October/2008 with Item A
Document2 created on 3/November/2008 with Item A
Document3 created on 4/November/2008 with Item A
Document4 created on 6/November/2008 with Item A
As document1, 2, 3 are created on 31, 3, 4(Friday, Monday and Tuesday)…these are the consecutive days (documents will not be created on Saturday & Sunday and considered consecutive days) and the occurrence will be 1
The document4 is created on 6 (Thursday), which is non consecutive and it’s considered as a separate occurrence and counted as 1
And I would like to get the results: Occurrences for Item A for 2008 are 2 (1 for consecutive and 1 for non consecutive)
Could someone please guide me how to achieve this?
Thanks
Sri