Any idea how I would sort a table based on TODAYs date?
I have a table that includes a column with dates - I want the table sorted by date (ascending by todays date).
Thanks!
Any idea how I would sort a table based on TODAYs date?
I have a table that includes a column with dates - I want the table sorted by date (ascending by todays date).
Thanks!
@Greg_Farries If this is a basic sorting question, here are few ways:
I don’t fully understand the wording of your question, so if it’s more involved than this, please clarify.
Here is an example of the standard sort by date:
Item One - Dec 2, 2017 - text
Item Two - Jan 1, 2018 - text
Item Three - Jan 2, 2018 - text
Item Four - Jan 7, 2018 - text
Item Five - Jan 12, 2018 - text
Here is what I need to sort by todays date:
Item Three - Jan 2, 2018 - text
Item Four - Jan 7, 2018 - text
Item Five - Jan 12, 2018 - text
Item One - Dec 2, 2017 - text
Item Two - Jan 1, 2018 - text
You see, Item One and Two are in the past, hence they’re at the bottom of the list of dates. I’m not interested in the year, just the day and month.
Tomorrow the table would display:
Item Four - Jan 7, 2018 - text
Item Five - Jan 12, 2018 - text
Item One - Dec 2, 2017 - text
Item Two - Jan 1, 2018 - text
Item Three - Jan 2, 2018 - text
Some background: this is a table to track renewals - specifically 12 month (1 year) renewals. So the items at the top of the table will be the items up for renewal; the items at the bottom of the table will be items that have past (and will slowly move up the table towards the renewal date).
I don’t know if we yet have sufficient calendar algo tools to do this to your spec.
What follows probably isn’t exactly what you want, but maybe it will spark an idea that you can run with.
I didn’t solve this all the way out or do much exceptions checking, so there are certainly mistakes in here. Just intended to give you some ideas.
I’d be very interested to see a clean solution for this.
Bumping this thread to see if there is a clean way to achieve this a year after OP