Filter data table with date and time

I’m trying to filter out date time of excel but having hard luck ,
can someone help me out?

@apurvalost - can you share more details?
whats your input data and expected output…

Use Filter Data Table and that use dates on which u want to add filter

@GBK @ImPratham45
Input is excel file and i have to filter this table by default its date , so direct filter data table wont work here

Share excel file

@ImPratham45 can’t share that excel file on this forum but i can share you same coloum

VALUED_DATE
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36
5/12/20 18:36

What u want to do on that data
All data are same

At present all are same and i have another case where date is different so i just to filter it out it with a specific date for example in this case 05/12/2020
@ImPratham45

Test.xlsx (9.2 KB) Main.xaml (9.3 KB)

This wont work as i have time attached to it, or other way i can say it can be any time in same cell but date should be specific in this case 5/12/20
@ImPratham45

@apurvalost
lets assume this sample data in datatable
grafik

you can work on string base and within filter data table use the startsWith = 05/12/2020 expression

A datetime oriented approach can be done with select by using the surrounding # character
grafik

Kindly note: the compair date has a different separator as it is using the . instead of /

having this result:
grafik

Otherwise LINQ can help as well

It was working fine in my system
what is time format in your system

Hi @ppr can you please share some document i can refer as this will just solve one of my issue as well this startwith never works

image

I feel like we should give a try with that dt.select one as this is coming in datetime type format from source

@apurvalost
have a look here.
DT_Select_ByDate.xaml (6.4 KB)

What it is doing on filter datatable and the use of “05/12/2020” without Cdate?

1 Like

@ppr
without cdate same output
Would mind explaining what does this is doing “SUBSTRING(Column1, 1, 10) = #05.12.2020#” As well if you any more tutorial for refrence would you mind sharing

@apurvalost
within the select syntax we are using the Function Substring and returning the first 10 chars
with surrounding ## we do indicate the date string should be converted to a datetime
compair operator is =

@ppr what if date is after first 10 characters? as file is coming from somewhere in cloud so just curious it should not break if time is in first 10 followed by date something like this 00:50:11 05/12/2020

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.