Hi,
Could someone assist me with an issue regarding dates. I have data from excel is formatted in general format. The dates appear as 03.01.2025 in Excel.
I have written a formula to change the Excel data into date format using DateTimeParse([Transaction_Date], "%d.%m.%Y"), and there are no issues with that, I hope.
However, I have another formula where I want to add a column that indicates if the date is equal to or greater than a certain date, it should show "Current". If the date is equal to or less than a different date, it should show "Old". If the data is not there, it should show "Unknown". The formula I used is below, but the results are not correct. All of my cells are showing "Old" even though some dates are after the specified date. Please see the formula below:
IF DateTimeParse([Transaction_Date], "%Y-%m-%d") > DateTimeParse("2025-09-30", "%Y-%m-%d") THEN "Current" ELSEIF DateTimeParse([Transaction_Date], "%Y-%m-%d") <= DateTimeParse("2025-09-30", "%Y-%m-%d") THEN "OLD" ELSE "Unknown" // Optional: Handle cases that don't fit either condition ENDIF
Thank you for your help!
Solved! Go to Solution.
I believe I have followed your advice, formula first, then select tool, then a created a simple formula to say if the date if past this date, then "Current" if not than "old" but all my data come back as old
Working fine for me
My issue is, when I ask the data to confirm if the data is prior or past the selected date, it bring back the incorrect answer. My last two pictures
This part is wrong
Try
If [........] >= "2025-09-30" THEN .... ENDIF
2025-09-30 is a static value, no need to parse it as it is in the correct format.
changed my formula but I still get the incorrect result. My column Rate current or old should be Current but it showing old, even tho the date is greater
The date is not greater as all the values shows January, that is why you get Old. It compares September to January, same year 2025.
You are a life saver. Cant believe I had the date as 2025. Thank you so much