INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: maxxsid on March 03, 2012, 01:57:40 pm

Title: How to convert [Name] to [Date]?
Post by: maxxsid 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
Title: Re: How to convert [Name] to [Date]?
Post by: Matt 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])
Title: Re: How to convert [Name] to [Date]?
Post by: maxxsid on March 06, 2012, 12:50:30 pm
Wow! Thanks for adding this feature!
Title: Re: How to convert [Name] to [Date]?
Post by: vagskal 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.