Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

records with field: audit_time

Hi Folks,

i have q question: I have following records with field: AUDIT_TIME, and field: AUDIT_TIME does look like: 06.02.2018 18:18:57

test_Field, audit_time

1, 07.02.2018 18:18:57

2, 06.02.2018 18:18:55

3, 05.02.2018 07:18:15

my question is: how can i compare or select the only records that have been reloaded today or yesterday? can i use in scriptarea the function: Today () to see only new records (records that have been reloaded today) ?

for instance: i want to see only the record:

1, 07.02.2018 18:18:57 for today

or

2, 06.02.2018 18:18:55 for yesterday

Thanks a lot for any feedback and help

Beck

7 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

in your script you can calculate if a record is from today or yesterday

something like

load timestamp(timestamp#(audit_time,'DD.MM.YYYY hh:mm:ss')) as audit_time,

     test_Field,

     if(floor(timestamp(timestamp#(audit_time,'DD.MM.YYYY hh:mm:ss')))=today(),'Today',

      if(floor(timestamp(timestamp#(audit_time,'DD.MM.YYYY hh:mm:ss')))=today()-1,'Yesterday')) As DayFilter;


load * inline [

test_Field, audit_time

1, 07.02.2018 18:18:57

2, 06.02.2018 18:18:55

3, 05.02.2018 07:18:15

]

beck_bakytbek
Master
Master
Author

Hi Liron,

thanks a lot for your feedback, i tried but it does not work

lironbaram
Partner - Master III
Partner - Master III

hi

attach is an app with sample data

you can see how it work

beck_bakytbek
Master
Master
Author

ok, i will do this now,  Liron i have one question, what is, if i want to compare my record on the base of field: audit_times, and namely i want compare : 07.02.2018 18:18: 57 with 07.02.2018 20:15:20

beck_bakytbek
Master
Master
Author

i see only today, and i am not able to see the records from yesterday or last days or years

lironbaram
Partner - Master III
Partner - Master III

hi

not sure i understood your question , what do you want to compare ?

beck_bakytbek
Master
Master
Author

i want to compare my records on the base of field: AUDIT_TIME

i do reload my date 3 time a day:

for exampel:

1, 07.02.2018 07:15:20 Old

1, 07.02.2018 12:20:20 Old

1, 07.02.2018 14:15:20 New


i mean this situation,


sorry for my unclear explanation