INTERACT FORUM

Please login or register.

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

Author Topic: Formating time  (Read 1069 times)

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Formating time
« on: January 23, 2007, 03:45:36 am »

Hi,

Is there a way to format the time of the day from a date field with the formatDate() function ?
I tried using hhmmss etc.. without any success.

I'm trying to build a custom field that would output something like 20070123-1230 (yyyyMMdd-hhmm) for pictures.

Thanks for any help,

Christian
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Formating time
« Reply #1 on: January 23, 2007, 03:59:15 am »

How is your [date (filename friendly)] field formatted?

Mine are filled like so: yyyymmdd-hhmmss, so, a custom library field using calculated data from the following template would produce the data you require:

mid([date (filename friendly)],0,13)

Close enough?

-marko.

Cmagic

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1196
  • Enjoying life with a little music....
Re: Formating time
« Reply #2 on: January 23, 2007, 06:45:23 am »

Hi Marko,

You're smart ! That did the trick thanks.
Anyway formating time directly might be useful in some cases.

Again thanks for the smart thinking,

Christian
Logged
Until the color of a man's skin is of no more significance
than the color of his eyes.
Bob Marley (War)
Pages: [1]   Go Up