Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

convert date functions in qlikview to sql

Hi,

I want to convert the following as where calue condition which used Qlikview function into sql and run and check it sql side.

could you please help me in converting there Qlikview function into sql

(DATE(DATE#(MID(time,1,10),'YYYY-MM-DD'))>=DATE(ADDMONTHS(TODAY(),-24))) AND (DATE(DATE#(MID(time,1,10),'YYYY-MM-DD')))<=DATE(TODAY()) .

13 Replies
sujeetsingh
Master III
Master III

Tej,

First of there no need to convert the qlik i sql. Explore SQL date function.

Well what you want to achieve by this?

vincent_ardiet
Specialist
Specialist

Which DB are you using? Oracle, SQL Server?

Anonymous
Not applicable
Author

@Vincent

SQL Server

Anonymous
Not applicable
Author

@sujeet

I wanted to check the exact Qlikview functions in sql and run the query in sql to get data from back end

I wanted to filter it in sql query for 2 years data like how I am filtering it in qlikview

senpradip007
Specialist III
Specialist III

Where do you use this condition in qlikview or sql server?

Anonymous
Not applicable
Author

I used these conditions in Qlikview and now I wanted to user the same conditions in sql

SreeniJD
Specialist
Specialist

Teja -

Try this..

SELECT * FROM tableName  WHERE columName
BETWEEN CURDATE() AND DATE_ADD(CURDATE(), INTERVAL 720 DAY)



vincent_ardiet
Specialist
Specialist

Try

Cast(Floor(Cast([time] as float)) as datetime) between dateadd(MONTH,-24,getdate()) and getdate()

Regards,

Vincent

Anonymous
Not applicable
Author

Hi sreeni and Vincent,

I am getting error while I am running this