INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: compare custom field date to current date  (Read 1241 times)

phiber2k4

  • Member
  • *
  • Posts: 4
compare custom field date to current date
« on: March 09, 2007, 03:43:40 pm »

hello everyone!  :D

I've a question that is impossible for me to solve - but most surely not a big problem for some of you...

I want to create an expression which compares a date from a custom library field to the current date and I'd like to try MC to give out a 1 if the current date has reached the 'deadline' from the custom library field date and 0 if it hasn't.
is there a simple way to do that?

many thanks in advance!

[Edit] first of all, sorry for this double post  :-X

but playing arround with expressions I stumbled upon an other problem that would be handy to be solved.

is there a way to make sure that all audio files in one folder have the same value in a certain field?

e.g. all files in "c:/mymusic/a/abba/greatest hits/" should have "greatest hits" in the album field. so how do I filter out files which are mistagged and have for example "unknown" in the album field??
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: compare custom field date to current date
« Reply #1 on: March 10, 2007, 03:29:09 am »

Morning phiber, welcome to interact.

MC never knows what the current date is so we cannot do compares like that. What MC does is count the number of seconds elapsed since 01/01/1970 for any given event such as a file imported, or played, and then works out the user friendly info that it presents to us in the shape of dates. I've no idea how it does it so I'm afraid I cannot be more technical than that!!

There are more than a few ways to manipulate the date and time data that MC generates but we would need more info about your 'deadlines' to know if your goal is achievable.
In this thread, I've used the [date (filename friendly)] field to sort my photos the way I want, and in this one, I've used the formatdate([date,0]) expression to give me numbers I can use to compare dates. It's quite possible that with more info, we could work out something that would work for you, though things that hinge around the current date are often difficult, the trick being to try and come up with a more static reference point that MC can track. What do the deadlines represent, and how is that data entered?

As for those 'unknown' or empty [album] fields, a search rule such as -al=unknown,[] will make sure none of those are shown in your view scheme.

-marko

phiber2k4

  • Member
  • *
  • Posts: 4
Re: compare custom field date to current date
« Reply #2 on: March 20, 2007, 02:46:49 pm »

It's quite possible that with more info, we could work out something that would work for you, though things that hinge around the current date are often difficult, the trick being to try and come up with a more static reference point that MC can track. What do the deadlines represent, and how is that data entered?

Hey again,

The form of the date I'd enter as a deadline is quite flexible, though it would be nice if I hadn't to calculate it into seconds :)

the date represents a 'deadline' in the form of a date (day, month, year). I'd write it into a custom field for each track. there are multiple reasons why I wanna try to do all this. One is to have a 'expiring date' for each track. so every one and then I'd search for files which are 'exprided' and then do tasks with them, e.g. move them to an archiving folder.

so basically what I need is a way to compare the current date to a date stored in a custom field...

thx again for your answers
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: compare custom field date to current date
« Reply #3 on: March 21, 2007, 05:04:16 am »

Quote
so every one and then I'd search for files which are 'exprided' and then do tasks with them, e.g. move them to an archiving folder.
MC tracks the [date imported].
Could you not base your expiry deadlines around that instead?
You would not have any data entry to perform for a start because MC would be tracking the date imported, and all that would be needed would be to come up with a filter that gathered the files together for you. Show all files imported 6 months ago or later, for example?

Quote
so basically what I need is a way to compare the current date to a date stored in a custom field
This is not possible at the moment. It may come some time in the future, it may not. My advice is to try to come up with a workflow method you can put to use now. Don't be afraid to ask questions, and don't forget to include as much detail as possible about what your goal is as that makes it easier to offer the right help and suggestions.

-marko.
Pages: [1]   Go Up