Date Comparison
- 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
Hello - I apologize for the simple question but I'm trying to compare the date of the column with current date in order to determine whether a row needs to be removed.
I have a column named "Beg Time" with dates that have been changed to the "Date" type (mm/dd/yyyy) in the Select tool. I would like to determine if the month and year of the beg time is less than the month and year of the current date, so that I may exclude this row from the data. For example a current date of 5/7/19 would exclude a beg time of 4/1/19, but would not exclude a beg time of 5/1/19.
I've tried a few different tools (DateTimeParse, Formula) but I keep getting invalid format errors.
Any help would be greatly appreciated.
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @crtakacs
Use Filter Tool with this Formula:
ToNumber(DateTimeFormat([Beg Time],"%Y%m")) >= ToNumber(DateTimeFormat(DateTimeNow(),"%Y%m"))
Note: Your beg time field should be in date format.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That worked! Thanks!
