Skip to main content
Announcements
Announcing Qlik Talend® Cloud and Qlik Answers™ to accelerate AI adoption! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error converting data type varchar to datetime when using stored procedure

Hi all,

I use a specific stored procedure for 2 years now.

And without any update the last months I get the following error since last week...

"ERROR converting data type varchar to datetime"

I use the following code:

Qlikview parameters who gives me first day last year and one year in the future:

LET vStartDate = DATE(YEARSTART(NOW(),-1), 'YYYY-MM-DD');

LET vEndDate = DATE(MonthEng(Addmonths(NOW(),12)), 'YYYY-MM-DD');

LET paraA = 1

LET paraB = 1

Using in Qlikview

SQL EXEC "$(vDatabase)".dbo.[STOREDPROCEDURE] '$(paraA)', '$(vStartDate)', '$(vEndDate)', '$(paraB)';

So it works for 2 years but the last month not....

How can this happen? The error is about the two date I think...

Can somebody help me please?

Kind Regards,

Martijn

1 Reply
agomes1971
Specialist II
Specialist II

Is this already solved? Or do you still have the same problem? In the Store Procedure you're invoking the dates with wich type?