Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
has75042
Creator
Creator

Logic on date

HI All,

My source data has STCLDT (store close date) is a 6 digit numeric filed in YYMMDD format, so if a store closed in December in the year 2000, the format would be 00125. Can't use makedate() function and compare dates. I am using a below logic to change into date format.

So if the store close date number is less than 1300, it defaults to 010101, which is a number than can be converted to a date easily.

if(STCLDT < 1300 and STCLDT <> 0, 010101, STCLDT) as Close_Date,

 Then, the below logic looks to see if there is a close date. if the numeric filed is zero, the store is open      

if(Close_Date = 0, 'N', 'Y') as Str_Closed,

So in source data, if some enters a  store closing date for next month.  I wanted to make above flag it in a way that the flag should still read as open store until 1 week or few days from the actual closing date.

1 Reply
uacg0009
Partner - Specialist
Partner - Specialist

could you please give some sample data and result that you want.
So I can try to get the solution for you.