Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Date function

hey all

i have a field looks like this :

example

6/1/2015 10:00:00AM

in need to show the data when this field is greater than today

hope you can help

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

Hi Mario,

Try,

=If(Date(Date#(YourFieldName,'DD/MM/YYYY hh:mm:ss tt'),'DD/MM/YYYY')> Date(Today(),'DD/MM/YYYY'),YourFieldName)

Or

=If(Date(Left(YourFieldName,8),'DD/MM/YYYY')> Date(Today(),'DD/MM/YYYY'),YourFieldName)

View solution in original post

4 Replies
deepakqlikview_123
Specialist
Specialist

If(Date(Yourfield,'DD/MM/YYYY')>Date(Today),Date(Youfield,'DD/MM/YYYY'))

Anonymous
Not applicable

Just editing?

=If(Date(Yourfield,'DD/MM/YYYY')>Date(Today,'DD/MM/YYYY'),Date(Yourfield,'DD/MM/YYYY'))

jonathandienst
Partner - Champion III
Partner - Champion III

If this is a text field (it will be left aligned in a list box), then the correct approach is to convert this field to a proper date/time field during the load:

     LOAD

          ...

          TimeStamp#(dateField, 'd/M/yyyy hh:mm:ssTT') As dateField

          ...


Now you can do simple compare:


     If(dateField > today(), ....)

     or

     If(floor(dateField) > today(), ...)

     (depending on your requirements)


Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tamilarasu
Champion
Champion

Hi Mario,

Try,

=If(Date(Date#(YourFieldName,'DD/MM/YYYY hh:mm:ss tt'),'DD/MM/YYYY')> Date(Today(),'DD/MM/YYYY'),YourFieldName)

Or

=If(Date(Left(YourFieldName,8),'DD/MM/YYYY')> Date(Today(),'DD/MM/YYYY'),YourFieldName)