help with day today and yesterday
Posted: Tue Feb 07, 2012 7:48 pm
hi community,
i have this problem and could not formulate a logic regarding dates/days. the scenarion is:
i have a search feature on my site and a filter for dates. in the dropdown, i have items from Monday to Sunday. if today is Wednesday then i selected "Monday" from the list, what i will get is the result for Monday the following week.same goes if i select "Tuesday". BUT if i select Wednesday, Thursday, Friday, Saturday, Sunday, i wll be able to get results from this week. i hope someone could provide me a logic as i hae spent 2 days doing this.
thanks in advance
i have this problem and could not formulate a logic regarding dates/days. the scenarion is:
i have a search feature on my site and a filter for dates. in the dropdown, i have items from Monday to Sunday. if today is Wednesday then i selected "Monday" from the list, what i will get is the result for Monday the following week.same goes if i select "Tuesday". BUT if i select Wednesday, Thursday, Friday, Saturday, Sunday, i wll be able to get results from this week. i hope someone could provide me a logic as i hae spent 2 days doing this.
thanks in advance