Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ajaykumar1
Creator III
Creator III

Getting only todat's date value from database

Hi Everyone,

I have the fields like below.

    

WHATSTATESTARTEDFINISHED
First JobReady10/29/2015 9:0110/29/2015 9:01
First JobReady10/28/2015 8:0110/28/2015 8:40
First JobReady10/27/2015 8:0110/27/2015 8:28
First JobReady10/25/2015 7:1610/25/2015 7:35
First JobReady10/23/2015 10:0110/23/2015 10:48
First JobNot Ready10/29/2015 9:0010/29/2015 9:01
First JobProcess10/29/2015 9:0010/29/2015 9:01
First JobMiddle10/29/2015 9:0010/29/2015 9:01

My conditions when am getting the data from the data base is;

What = 'First Job' and State = Ready and Started = todaysdate

With that above sample data then 0 records should come .But after if i run this extractor after some time

If my 'Started' have todays time stamp(i.e. e.g 10/30/2015 10.15) then i need to get those records.

I hope my requirement is clear.

Thanks,

Ajay

16 Replies
Anonymous
Not applicable

you already specified your conditions.

use the follwoing condition

load ...

from xyz

where (What='First Job') and (State='Ready') and (date#(Started,'DD/MM/YYYY')=today())

maybe you Need to Format today() also if today() doesnot return in Format DD/MM/YYYY

mayankraoka
Specialist
Specialist

Hi,

USE TODAY() to get latest date

Regards,

Mayank

ajaykumar1
Creator III
Creator III
Author

Thanks Rudolf.But its not working  and giving error related to today

(What='First Job') and (State='Ready') and (date#(Started,'DD/MM/YYYY')=today('DD/MM/YYYY')) ---today is invalid identifier

Am getting data from DB...its looks like some time stamp issue..

Plz attach the sample app if any.

Ajay

HirisH_V7
Master
Master

Hi ajay ,

Check the attachment 1 & 2.Hope it helps.

thanks,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable

today is only valid as function today()

if you Need further formatting you may use

date function around today()

date#(today(),'DD/MM/YYYY')  - means, recognizes the date Format of today() which is in Format DD/MM/YYYY

-> If you know that today() Returns this Format you donot Need the data# function

-> try in TextBox =today() to see what dateformat will be returned

ajaykumar1
Creator III
Creator III
Author

Hi Harish,

I want to from backend.

ajaykumar1
Creator III
Creator III
Author

I have tried that...But not working...

Could you please add my logic in sample data which i given..

More thanks,

Ajay

HirisH_V7
Master
Master

Check the Second attachment . Make mods in time stamp according to your requirement .

=Today('DD-MM-YY h:mm:ss[.fff] TT')

Hope that helps,

Regards,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable

i assume, that today() is not recognized from your database

can you check what function is available from your database

alternative you load without restriction of date and provide

the condition in QV while loading from resident table

if you get a uge amount of data, best solution let the database

do the conditions

Step1:

load ..

from ...

where (What='First Job') and (State='Ready')

Table:

noconcatenate load

*

resident Step1

where (date#(Started,'DD(date#(Started,'DD/MM/YYYY')=today())p/MM/YYYY')=today())

drop table Step1