Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.