[X] Sort by date Added column not working past 2014

When you attempt to sort by the date "Added" column (%_file_create_datetime%), the column does not sort correctly. The date resets in 2015. For example, if you sort by oldest first, it will sort like this:

1/1/2015
1/2/2015
1/10/2015
2/1/2015
2/5/2015
2/15/2015
2/22/2015
2/23/2015
1/1/2010
1/10/2010
1/1/2011
1/1/2012

As you can see in the example, it will start with the first file added in 2015 through the most recent file added in 2015 and then reset to the oldest file added.

If you reverse the sort and sort by newest first, it starts with some arbitrary date in the past, for me it was 12/16/2014 then list from oldest as of 12/16/14 to the oldest file and then will list the most recent files from todays date down. For example, the results will look like this.

12/16/2014
12/15/2014
11/1/2014
1/1/2014
10/1/2013
1/1/2013
1/1/2012
1/1/2010
2/23/2015
2/24/2015
2/1/2015
1/1/2015

As you can see in both examples, there is no longer any way to get the most recent file at the top or the bottom of the column; the date values reset in 2015.

I have only noticed this as of 2015. Dates older than that (from 2014 and older) all sort correctly.

I cannot reproduce this.
What I can see is that any date is sorted by the first number in the date string. This may lead to unexpected results.
So if you want to get a proper sorting, modify the column definition as follows:
Value: %_file_create_date%
Field:
Sotr by: %_file_create_datetime_raw%

Sorting by %_file_create_datetime_raw% does indeed allow me to correctly sort by newest to oldest or vice versa, but what happened to %_file_create_datetime%? I have been sorting by that value for years and it only stopped working when the date range reached into 2015.

As i said: I don't know as I do not see a different behaviour on my system in respect to "cooked" dates.
Perhaps, on your local system, the definition for the column was different before and got reset?
I hope that the additional definition of the sort criteria helps you to get the expected results.

Usually the string value of %_file_create_datetime% contains a part with the date value and a part with the time value.
Your example does not show the full datetime string as delivered by %_file_create_datetime%.
Your example does only show the date part.
What happened with the time part?
Is there any formatstring involved in the column definition, which suppresses the time part?
Probably this formatstring does not work correctly?
Is the sort mode set to "numeric=yes" or "numeric=no"?
Sort mode should be "numeric=no" because the datetime value is a string.

Note that the value from %_file_mod_datetime% is the better choice to distinguish file datetime changes.

Because your system is set to a national date time format (M/D/Y) with AM/PM modification, ...
which cannot be sorted by simple stringsort, ...
you should use for technical sorting the numerical raw datetime value %_file_mod_datetime_raw%, ...
and for displaying use the human readable datetime string.

Another choice would be ... set your system to ISO 8601 international datetime convention, ...
then all datetime strings can be sorted by simple stringsort ...
without any error (YYYY-MM-DDThh:mm:ss).

DD.20150225.1808.CET


My apologies if my examples were too vague.

I've included screenshots of the column definition and of the results when sorting on that column hoping to better illustrate the problem.

This screenshot is of the column definition



This screenshot is the results, sorted newest to oldest:



This screenshot is the results, sorted oldest to newest:



From the screenshots and the column definition I see that you sort a string, not a number - you have not ticket "Numeric".
So you get all the 1s first, then the 2s, then the 3s and so on.
As 11 has a 1 as first character you find it before the 2s ...
Even if you use the numeric sorting, it will probably still not look like a calendaric sequence. Please the raw data as sorting criterium as all other dates depend on the local settings for language and values.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.