Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear, I am a QlikView user, please my need is to create a filter for a range of dates, but included with hours and minutes.
For example a range would be:
Start: Date: 09/07/2020 Time: 13 Minute: 30
End: Date: 09/13/2020 Time: 18 Minute: 59
In advance I appreciate your help.
Juan
Thank you, you gave me some light on the way, I solved it as follows:
Filter panel
structure
I thank you
@juanma21 can you please elaborate?
Hello Kush,
I am trying to filter a start and end range that includes date, hour and minutes.
@juanma21 is it fixed range you want to filter ? What is your filter criteria?
The initial and final data are entered by the user, and depending on that, the information must be filtered, they are not fixed data.
@juanma21 try below.
Set the timestamp format variable (In main tab of load script) which matches the values coming from source
SET TimestampFormat='DD/MM/YYYY hh:mm:ss';
Note : I have assumed the format but you need to provide the format according to your source data values.
see the attached qvw for the same.
Thank you, you gave me some light on the way, I solved it as follows:
Filter panel
structure
I thank you
Juan,
would you be so kind to share the example you made with me?
Thanks.
Jan Droog
The need arose to filter by date, hour and minute range, since the data comes in that format. Create 4 island tables, time_ini. end hour (from 0 to 23) and min_ini, end minute (from 0 to 59)
SCRIPT:
Hora_Ini:
Load RowNo()-1 as Hora_Ini
AutoGenerate(24);
Minuto_Ini:
Load RowNo()-1 as Minuto_Ini
AutoGenerate(60);
Hora_Fin:
Load RowNo()-1 as Hora_Fin
AutoGenerate(24);
Minuto_Fin:
Load RowNo()-1 as Minuto_fin
AutoGenerate(60);
and the button property has this string: ='>='&(v_Rango_Ini)&'<='&(v_Rango_Fin)
you have to create these variables
v_Rango_Ini
=Date(Timestamp#( '$(v_Fecha_Ini)' &' '& '$(v_Hora_Ini)' &':'& '$(v_Minuto_Ini)' &':00', 'DD/MM/YYYY hh:mm:ss'), 'DD/MM/YYYY hh:mm:ss')
v_Rango_Fin
= Date(Timestamp#('$(v_Fecha_Fin)' &' '& '$(v_Hora_fin)' &':'& '$(v_Minuto_Fin)' & ':59', 'DD/MM/YYYY hh:mm:ss'), 'DD/MM/YYYY hh:mm:ss')
calendar objects
If you have any questions, let me know.
Greetings
Juan