INTERACT FORUM

Please login or register.

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

Author Topic: Night shots expression  (Read 1580 times)

park

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2358
  • I wish I had more to say!
Night shots expression
« on: December 08, 2008, 09:01:50 am »

Hi all,

I'm trying to make an expression that will show me all my night photos. I created a custom field with the following calculated data:

If([Time]>17:00,1,0)

But obviously it doesnt work, since there is no field called "Time" in MC. Does anybody know how to strip the time part out of [Date] field?
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: Night shots expression
« Reply #1 on: December 08, 2008, 09:34:05 am »

Currently:
IsEqual(Mid(FormatDate([Date, 0], filename), 9, 2), 17, 6)

In build 13.0.87 and later:
IsEqual(FormatDate([Date, 0], hour), 17, 6)
Logged
Matt Ashland, JRiver Media Center

park

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2358
  • I wish I had more to say!
Re: Night shots expression
« Reply #2 on: December 08, 2008, 09:59:19 am »

Thanks Matt.
I've pasted in the latter one and will wait for the next build.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9124
Re: Night shots expression
« Reply #3 on: December 08, 2008, 12:13:39 pm »

ahhh, nice one.
Thank you.

park

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2358
  • I wish I had more to say!
Re: Night shots expression
« Reply #4 on: December 10, 2008, 10:50:23 pm »

It's a useful field to have. I recommend putting it in image view's quickie's pane by default.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9124
Re: Night shots expression
« Reply #5 on: December 11, 2008, 02:09:55 am »

less useful perhaps, but just as clever, if you put:
formatdate(now(),dddd dd//MM//yyyy)  padnumber(formatdate(now(),hour),2):padnumber(formatdate(now(),minute),2)
in the player display, it displays the current day, date and time!!



-marko.
Pages: [1]   Go Up