I have to check two date fields for one condition which falls under same day. Second condition considers entries after midnight which still needs to be accounted for that previous date entries. for ex: an entry comes from 12am to 4 am, it should be accounted into previous date only. xyz inquiry coming on 14th july 12am to 4 am should be counted in 13th july. if inquiry come after 14th july 4am, it will be counted in 14th july.