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: 
Not applicable

Date

Hi Guys,

I have a date in the format of YYYYMMDD, i need to create 2 variables, one with the max date (easy), and the next with the day before, i cannot simply calculate it because the 1st will always end up with zero's, eg: 20160201 would be present day and 20160200 would end up as previous day.

so in my mind convert the number to a date and then do the calculation but there is no date add functionality (similar to month add)

anyone please assist.

Regards

1 Reply
swuehl
MVP
MVP

LOAD

     Date#( DateField, 'YYYYMMDD') as DateField

FROM ....;

Now you can just write

=Date( Max( DateField),'YYYYMMDD')

resp.

=Date( Max( DateField)-1 ,'YYYYMMDD')