INTERACT FORUM

Please login or register.

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

Author Topic: Expression help  (Read 2309 times)

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 718
  • Hi
Expression help
« on: September 09, 2016, 12:01:20 am »

This is probably easy but it's been a long stressful week and my brain is a bit fried.

What I want to do is group my movies in 15 minute chunks and then, in theater view, be able to sort by time.  so it would look like

movies less than 30:00, 30-45, 45-60, 60-75, etc.

Basically, I want to be able to see that it's 9:30 and I want to be in bed by 11:00 I can look at all my movies less than 1:30 or whatever.

I have all the expressions for the individual grouping, but I can put them all together into a single expression. Below is the time expressions for each individual part of the group

[Duration]=<900
[Duration]=>900 [Duration]=<1800
[Duration]=>1800 [Duration]=<2700
[Duration]=>2700 [Duration]=<3600
[Duration]=>3600 [Duration]=<4500
[Duration]=>4500 [Duration]=<5400
[Duration]=>5400 [Duration]=<6300
[Duration]=>7200 [Duration]=<8100
[Duration]=>8100 [Duration]=<9000
[Duration]=>9000 [Duration]=<9900
[Duration]=>9900 [Duration]=<10800
[Duration]=>10800

Any help would be greatly appreciated. I have a feeling it's super easy but I'm having no luck.


 
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Expression help
« Reply #1 on: September 09, 2016, 12:54:18 am »

How about this for starters:
Code: [Select]
ifelse(isrange([duration,0],1-900),15 Minutes,
isrange([duration,0],1-1800),½ Hour or Less,
isrange([duration,0],1-2700),¾ Hour or Less,
isrange([duration,0],1-3600),1 Hour or Less,
isrange([duration,0],1-4500),1¼ Hours or Less,
isrange([duration,0],1-5400),1½ Hours or Less,
isrange([duration,0],1-6300),1¾ Hours or Less,
isrange([duration,0],1-7200),2 Hours or Less,
isrange([duration,0],1-8100),2¼ Hours or Less,
isrange([duration,0],1-9000),2½ Hours or Less,
isrange([duration,0],1-9900),2¾ Hours or Less,
isrange([duration,0],1-10800),3 Hours or Less,
1,Longer than 3 hours)

There's no 'fuzzy', so something that's 1 hour and 1 second long goes in the 1¼ hour group.

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 718
  • Hi
Re: Expression help
« Reply #2 on: September 09, 2016, 10:34:08 am »

That's perfect, thank you Marko!
Logged
Pages: [1]   Go Up