Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Expression on how to get data by specific time

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

Re: Expression on how to get data by specific time

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

MVP
MVP

Re: Expression on how to get data by specific time

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.


Community Browser