I have a dataset that has a 2 specific date columns - purchase date and maturity date. For some records, we expect no maturity date and our source system spits out 999999 for the maturity date. All the other dates are spitting out as YYYYMMDD. I need to calculate the difference between the time we purchased and the date it matures in order to classify it correctly. If the time between purchase and maturity is greater than 31 then it needs to be long term and short term if less than 31. The problem is the date formats are calculating the days incorrectly:
MaturityDate PurchaseDate
20240810 - 20240711 = 100 instead of 30 so its classifying as long term when really its short term
I think the problem is Alteryx does not recognize these two date formats as dates. Would changing the date format to MM/DD/YYYY via the datetimeformat formula fix my issue?
Thanks,