Author Topic: Modification Time  (Read 1900 times)

Offline louismccullagh

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Modification Time
« on: January 26, 2023, 03:21:30 AM »
Is it possible to have the modification time come up in contact sheet as HRS MINS SECS?
Thanks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Modification Time
« Reply #1 on: January 26, 2023, 07:33:40 AM »
Is it possible to have the modification time come up in contact sheet as HRS MINS SECS?
Thanks

The format of the {mtim} variable is set by the preferences in your OS for the time string, so you do have some control over that.  But if that doesn't provide enough control, you can use Variable Substring Extraction to customize it further.  With my settings on macOS, I can mostly get what you want with:

{mtim:-11,2}{mtim:-8,2}:{mtim:-5,2}

Some times have a two digit hour and some times only have a single digit hour, so the above will sometimes show something like 1:10:48 and sometimes show 1210:48 which is not great.  If I turn on 24 hour time, a leading zero exists on the hours and then I can make it consistent.

I suggest experimenting with the above.  Let me know if you need further assistance.

For more information see: https://docs.camerabits.com/support/solutions/articles/48001077381-variable-substring-extraction

-Kirk

Offline louismccullagh

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: Modification Time
« Reply #2 on: February 01, 2023, 04:55:53 AM »
Hi Kirk
I put your string into LABEL 2 for contact sheet and now 12.14pm comes up as 1212:14 I do not know why it says 1212.

I am on a MAC and have it set as a 24 clock in system preferences. Is there somewhere else I should be changing?

Thanks
Louis

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Modification Time
« Reply #3 on: February 01, 2023, 08:49:12 AM »
Louis,

I put your string into LABEL 2 for contact sheet and now 12.14pm comes up as 1212:14 I do not know why it says 1212.

I am on a MAC and have it set as a 24 clock in system preferences. Is there somewhere else I should be changing?

You'll have to experiment with the index (-11).  If your clock doesn't have a leading zero when the time is between 1 and 9, then there will be no consistent way to produce what you want.

-Kirk