Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression on how to get data by specific time


Hi,

Im currently doing an expenxe report. can you please help me how will I get all the expense reports submitted in a particular time? For Ex: Id like to get all the expense reports submitted not later than 12:00 noon? Here's the example of my date format (8/22/2013  12:14:04 PM)

Thanks!

-

3 Replies
jagan
Luminary Alumni
Luminary Alumni

HI,

Try this expression

=Count({<DateTimeDimension={"<=$(=Date(Date#('8/22/2013  12:00:00 PM', 'M/D/YYYY hh:mm:ss TT'), 'M/D/YYYY hh:mm:ss TT)")}>} Value)

HOpe this helps you.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

Thanks a lot for this but im still a bit confused.

if(Date(Date#()),'DD.MM.YYYY hh:mm:ss TT')<=Date(

Date#('DD.MM.YYYY 12:00:00 PM'),'DD.MM.YYYY hh:mm:ss TT'),'Within','Over'

as SLA

>> Above is what I did.

>> Also, with the script that you gave, what will I put instead of

('8/22/2013 12:00:00 PM', 'M/D/YYYY hh:mm:ss TT') since I have lots of

dates in my Step Entry Date/Time field?

Thank you

jagan
Luminary Alumni
Luminary Alumni

Hi,

The expression which I gave you restricts the records less than or equal to the '8/22/2013  12:00:00 PM', since your post heading says "get data by specific time".

If you have this flag

if(Date(Date#()),'DD.MM.YYYY hh:mm:ss TT')<=Date(

Date#('DD.MM.YYYY 12:00:00 PM'),'DD.MM.YYYY hh:mm:ss TT'),'Within','Over'

as SLA

then you can restrict like this

=Count({<SLA={'Within'}>} Value)

This is the best method, since calculation is done in script.

Regards,

Jagan.