INTERACT FORUM

Please login or register.

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

Author Topic: How to convert [Name] to [Date]?  (Read 880 times)

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 866
How to convert [Name] to [Date]?
« on: March 03, 2012, 01:57:40 pm »

Hi guys,
I tried but couldn't figure it out...
I need to be able to convert [Name] to [Date].
The reason for this is that I sort my images by [Name] formatted as 2012-02-03_18-21-00 and the names not always correspond to dates as I sometimes edit names manually to have the correct order.
It easy to do [Date] to [Name] but not the other way around...
Thanks!
--max
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42387
  • Shoes gone again!
Re: How to convert [Name] to [Date]?
« Reply #1 on: March 06, 2012, 11:23:25 am »

In Media Center 17.0.102 and newer:
Changed: Added the expression function ConvertDate(...) to convert a human readable date to the internal date format (example: ConvertDate(3/6/2012) or FormatDate(ConvertDate(3/6/2012), decade)).

So, edit [Date] and type:
=ConvertDate([Name])
Logged
Matt Ashland, JRiver Media Center

maxxsid

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 866
Re: How to convert [Name] to [Date]?
« Reply #2 on: March 06, 2012, 12:50:30 pm »

Wow! Thanks for adding this feature!
Logged

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: How to convert [Name] to [Date]?
« Reply #3 on: March 07, 2012, 02:22:17 am »

In Media Center 17.0.102 and newer:
Changed: Added the expression function ConvertDate(...) to convert a human readable date to the internal date format (example: ConvertDate(3/6/2012) or FormatDate(ConvertDate(3/6/2012), decade)).

So, edit [Date] and type:
=ConvertDate([Name])

Great, thanks!

Now we need only a &datatype[Date] switch so we can use the new expression in custom calculated fields.
Logged
Pages: [1]   Go Up