INTERACT FORUM

Please login or register.

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

Author Topic: Library Field for the current date?  (Read 1361 times)

Leroy Bad

  • Member
  • *
  • Posts: 3
Library Field for the current date?
« on: July 18, 2015, 09:51:19 pm »

I'm sorry to bother, but I've been looking for an answer to this question on my own and haven't been able to find one.
I'm trying to create a file path that contains the current date when sending files to a hand held device. For example:[today's date]/[Album Artist (auto)]/[album]. I see in the Manage Library Fields section there are 11 different Date fields, but none of them seem to do what I want.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Library Field for the current date?
« Reply #1 on: July 18, 2015, 11:16:59 pm »

You're on the right track.  But you don't want a library field.  You want an expression.  In particular, you want the Now() function and you want to modify it with formatdate().  Here's a concrete example you can play with:

Code: [Select]
formatdate(now(), %Y M d hh:mm)
This will give you the current date and time. I've broken out the Year Month Day Hour and Minute in this example.  You can tell it to format it any way you want.  Here's how you tell it what format:

http://wiki.jriver.com/index.php/Expression_Language#FormatDate

If you have trouble figuring it out, post here and we can help you get the right date and/or time string to look how you want it to.

Good luck!

Brian.
Logged
Pages: [1]   Go Up