A Tip for Filtering by File Dates


#1

To make a playlist of "recent additions", I wanted a filter to return all files under my Music folder created after a specified date, regardless of location.

The information field %_file_create_datetime_raw% is available, but there is no way within Mp3tag to get a user-specified timestamp to filter on. The best you can do is to copy an existing timestamp from a file in a custom column. This is awkward and imprecise because you cannot choose the exact date(s) that you want.

Raw timestamps use epoch time (sometimes called Unix time). That is the total number of seconds that have elapsed since January 1, 1970 at midnight GMT, and is the format displayed by both %_file_create_datetime_raw% and %_file_mod_datetime_raw%.

I found a site that makes the conversion easy: www.epochconverter.com You simply enter a normal date in one of their "human date to timestamp" sections, and one click later you have a timestamp value in epoch format. Just paste that number into your filter expression. No need to customize Mp3tag columns.

For example, this filter returns files created after 01 Jun 2012 at 00:00:00 GMT:

%_file_create_datetime_raw% GREATER 1338508800

The next filter returns files created between the above date and 16 Jun 2012 00:00:00 GMT:

%_file_create_datetime_raw% GREATER 1338422400 AND %_file_create_datetime_raw% LESS 1339804800

#2

That is not quite right. Mp3tag provides precise datetime_raw values per file.
Copy and paste the raw value from one place to another place within Mp3tag user interface needs not more time than using an external webservice.
Read there ...
Filter by date?
Filter if "modified date" is greater than "create date"

... there is just the need to have a running internet connection.

DD.20120613.0500.CEST


#3

Hello Detlev,

With all due respect and with gratitude for your great work in this forum, I think that you missed my point.

The values in my examples could not have been pasted from Mp3tag because I have no files with those time stamps. I did not mean that the values shown in Mp3tag are inaccurate, only that they were not the values that I wanted. Using values taken from my files would have made my filter imprecise.

I had read the posts that you mentioned before I posted. I had not seen the epoch converter site mentioned here, so I thought that it might be of interest as an alternative.

Regards,
Doug Mackie


#4

Hm ... no offense ... maybe misunderstanding at my side.
But ... having a group of files in Mp3tag lsit view, it is possible to detect the youngest and the oldest files, just by sorting the file by datetime/raw, and then two concrete existing values are known, the datetime edges of this group of files.
It is possible to pick one or more datetime/raw value and put it into a filter expression, in order to filter the group for files larger or smaller or having a dedicated value.
Sure, it is not possible to pick a datetime/raw value for the filter expression, which is outside of the current group of files.
But this should not so important, because anyway such a datetime/raw value is not a member of the group of files.

And yes, knowing the epoch converter webservice to be exist, can help if needed.
It is always smarter to use an exact service than the win calculator to get an approximate value.
I will thinkover how to bring this service to the desktop, at best it is provided in the Mp3tag tools menu.

The q&d solution ... needs internet connection ....
MTTOOLSNAME=Ep&ochConverter
MTTOOLSPARAM=http://www.epochconverter.com
MTTOOLSPATH=
MTTOOLSINST=0

DD.20120613.1923.CEST