How to filter a date

hi

I am using Grid in which I have applied server side filtering.

In database, format of date is UTC i.e 2021-06-07 04:43:40.507

Please let me know through filter, how I will search the data of this date.

Thanks

1 Reply 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team June 9, 2021 02:32 PM UTC

Hi Namita,  
  
Thanks for contacting Syncfusion support. 
 
Based on your requirement, you want to filter the date values from your server. To filter the date values, the data-base should have the field values in Date Object format. Please refer to the below code example and sample for more information. 
 
 
public class OrdersDetails 
 {        
   public int? OrderID { get; set; } 
             
   public DateTime? OrderDate { get; set; } 
 } 
 
 
[app.component.html] 
 
  
 <e-column field='OrderDate' headerText='Order Date' type="date" format="yMd" width="120"></e-column> 
 
 
 
 
Note: In EJ2 Grid, we don’t have the support to search the DateObject values 
 
Still if you have the issue, please share the below details. 
 
  1. Share the full Grid code you have used.
  2. Which type of adaptor you have used. (OData/ ODataV4/RemoteSave/URL Adaptor/ WebApi)
  3. Explain your requirement in detail.
 
Regards, 
Rajapandiyan S 


Marked as answer
Loader.
Up arrow icon