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: 
vikasmahajan

Date Field Timestamp Convertion with date yyyy-mm-dd format

Dear all,

I have variable vMaxDate which hold max value of date from QVD. I want to check backdated -12 months in this variable like this

vBackDateMonths = -12;

I have backdatestart like this

LET vBackDateStart = TimeStamp(MonthEnd(AddMonths(DATE(Floor(vMaxDate),'YYYYMMDD'),$(vBackDateMonths))),'YYYYMMDDhhmmss');

which gives me this value which is correct 20160531235959

Now in transaction my Reporting_Dt is in  ÝYYY-MM-DD  format  how to convert the into  ÝYYY-MM-DD' format ?


Vikas


Sunny : Can you please check this qvw I am not able to get the records

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
2 Replies
sunny_talwar

Format doesn't matter for where statement within QlikView as long as QlikView interpret it as date... try this

Date#(Left(vBackDateStart, 8), 'YYYYMMDD')

sunny_talwar

or if you really want the format, then may be this

=Date(Date#(Left(vBackDateStart, 8), 'YYYYMMDD'), 'YYYY-MM-DD')