Time Filter

Hello guys, i have a data that contains date(today(20230324) and yesterday((20230323))) and time. i want to take out data that contains yesterday <= 1500(hhmm) and today >= 1500(hhmm). pliss help me i try with filter data table but it’s does’t work
DataOpen.xlsx (27.4 KB)

Hi,

you can just use if( Cdate(CurrentRow(“Date”).ToString) >= Cdate(Today.ToString) and Cdate(CurrentRow(“Date”).ToString) <= Cdate(Yesterday.ToString)) in For Each Row in Data Table activity

HI,

Can you try the following sample?

arrDrBefore = dt.AsEnumerable.Where(Function(r) DateTime.ParseExact(r("BOOKING_DT").ToString+CInt(r("JAM_TRANSAKSI").ToString).ToString("0000"),"yyyyMMddHHmm",System.Globalization.CultureInfo.InvariantCulture)<=targetDate.Date.AddDays(-1).AddHours(15)).ToArray

arrDrAfter = dt.AsEnumerable.Where(Function(r) DateTime.ParseExact(r("BOOKING_DT").ToString+CInt(r("JAM_TRANSAKSI").ToString).ToString("0000"),"yyyyMMddHHmm",System.Globalization.CultureInfo.InvariantCulture)>=targetDate.Date.AddHours(15)).ToArray

Sample20230327-5L.zip (28.8 KB)

Regards,

Thanks for reply. but i can’t run your activity,

Hi,

How did you open the project? Can you extract whole the project into file system, then open Main.xaml in it?

Regards,