INTERACT FORUM

Please login or register.

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

Author Topic: Calendar pane tip  (Read 1836 times)

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Calendar pane tip
« on: April 25, 2015, 04:14:52 am »

It's been so long since I looked at a default install, this might be in there already. If it's not, I think it should be. Sometimes, the simplest things can be most useful.

Take the following expression and use it to create an expression based pane, and/or use it to create a Calendar library field...

Code: [Select]
formatdate([date,0],yyyy\MM\dd,No Date)&datatype=[list]
This will give you a Year > Month > Day tree. Try it, you might like it. If find it indespensible in my image library.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Calendar pane tip
« Reply #1 on: April 25, 2015, 09:38:22 am »

Nice.  Here's another two relatively simple ones I use a bunch of places for "newly imported" views:

Make an Calculated Field or Category called Week Imported.  Use this expression:
Code: [Select]
FormatDate([Date Imported,0], yyyy - week %U, Unknown Date Imported)
When you use it as a Category, set the Sorting to Descending. It makes a nice compact "filter by week" Category you can use alongside other Categories easily.



Likewise, that special Imported column you see in the screenshot above is a Calculated Field.  Make one called Date Imported (Smart) and set the Display text settings for the field to "Imported".  Use this expression:

Code: [Select]
if(compare(math(now() - [Date Imported, 0]), <, 365), FormatDate([Date Imported, 0], MMM dd, unknown), FormatDate([Date Imported, 0], yyyy, unknown))
If it was imported less than 1 year ago, it uses the short date formatting you see above.  If it was more than one year ago, it spits out just the four digit year.  This is nice to use as a Column in a view because it can be kept very narrow and used at the "front" of a set of columns in a view like this.

Both of these can also be used for "Week" and "Date (Smart)", using the [Date, 0] field like in Marko's example above.

Date (Smart):
Code: [Select]
if(compare(math(now() - [Date, 0]), <, 365), FormatDate([Date, 0], MMM dd,), FormatDate([Date, 0], yyyy,))
Week:
Code: [Select]
FormatDate([Date,0], yyyy - week %U, Unknown Date Taken)
Those versions are handy for photos as well.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Arindelle

  • Citizen of the Universe
  • *****
  • Posts: 2772
Re: Calendar pane tip
« Reply #2 on: April 25, 2015, 09:55:15 am »

thanks for sharing  :)
Logged
Pages: [1]   Go Up