Issue with date filtering on data grid

0
I’ve a data grid with an attribute  called “Received Time’ which is of Date and Time type. It is non localized. The database from which i’m fetching it's value is an external sql database that stores it as UTC time date and ‘smalldatetime’ data type.  I’ve two comparison fields on the attribute Received time, called “From Date’ and “to Date’. Condition is – From Date >= Received Time and To Date<= Received time. So it basically works as a date filter to filter out records in data grid for the set of dates selected. The problem i’m running into is, if i select from date as 04th dec and to date as 04th Dec, i.e it should return records of 04th dec only, records of 05th Dec with times in source sql database ranging from 01:12:00 to 19:07 are also included. Another example- if i select from date as 06th dec and to date as 06th Dec, records of 07th Dec with timestamps upto 04:13 pm for 7th Dec are also included. My requirement is to filter on selected dates only. Why are the records for next day being included?
asked
3 answers
0

Hi Pranav,

I think it could help if you provide a screenshot of the data in the grid and the criteria entered in the search.

You should include the Time in your search box if you select like that.  
Or if you use date only without time you should say : 
datetimefromdatabase >= day(X) and datetimefromdatabase <= day(X+1)

I am a bit confused about your time-criteria. 

If I would filter I would filter like this:  [fromdatetime <= datetimefromdatabase <= todatetime] 

Have a try or add some screen shots..

Goodluck

answered
0

Screenshot for From date time dropdown – 

 

Screenshot for to datetime dropdown – 

 

Screenshot of data grid – 

answered
0

Screenshot of data in data grid – 

As you can see here, from date and to date are both 4th dec, but data for 5th dec upto 7 pm is also showing up

 

answered