INTERACT FORUM

Please login or register.

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

Author Topic: Expression: Date Range  (Read 840 times)

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1356
Expression: Date Range
« on: April 26, 2012, 10:16:07 pm »

Hi guys... Does anyone know how I can create an expression that will output a range of dates?

I'm stumbling around with formatrange in the expression language, but no luck...

For example, if I have a TV show, I want it to display:
  American Dad! (2005-2012)
  [Series] ([Date Range from minimum to maximum])

Thanks in advance!

Chris
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression: Date Range
« Reply #1 on: April 26, 2012, 11:08:16 pm »

[Series] /(formatrange([date (year)], 10, 2)/)
Logged
The opinions I express represent my own folly.

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1356
Re: Expression: Date Range
« Reply #2 on: April 27, 2012, 02:02:38 am »

Thanks MrC, but not quite!

That's giving me a range of 10 years... what I'm after is a way to show the first year the show ever aired, then the latest...

Eg If a show only runs for 2008 and 2009, it would show 2008-2009, not 2000-2009.

Can this be done?
Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: Expression: Date Range
« Reply #3 on: April 27, 2012, 05:52:04 am »

Only way, that I can think of, to do this is to create a relational field set to series and enter it manually. But you'll only have to enter it once for the whole series and also only need to update when the series end.
Logged
Pages: [1]   Go Up