Date issue with, result are not correct
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Alteryx Practice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Working fine for me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This part is wrong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try
If [........] >= "2025-09-30" THEN .... ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
2025-09-30 is a static value, no need to parse it as it is in the correct format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You are a life saver. Cant believe I had the date as 2025. Thank you so much

- « Previous
-
- 1
- 2
- Next »