Page 1 of 1

Date format "variables"

Posted: 29 Jun 2015 20:33
by Garonne
Do we have a full documentation of the date format variables available?
I checked the documentation and only found the information available in the "date variable" section, which isn't at all complete.

Of course I was able to deduce some based on the information given:
  • d -- Day of Month, no leading zero
  • dd -- Day of Month, leading zero
  • ddd -- Day of Week, Abbreviated
  • dddd -- Day of Week, Full
  • ddddd -- Full date (System Format, short?)
  • dddddd -- Full date (System Format, long?)
  • m -- Month, no leading zero
  • mm -- Month, leading zero
  • mmm -- Month, Abbreviated
  • mmmm -- Month, Full
  • yy -- Year, two digits
  • yyyy -- Year, four digits
  • w -- Day of Week (numeric, Sun-Sat, 1-7?)
  • ww -- ISO number of Week?
  • h/hh -- Hour of day (24h format?) without/with zero padding
  • n/nn -- Minute (without/with zero padding)
  • s/ss -- Second (without/with zero padding)
  • Zodiac -- Date converted to Zodiac sign text
  • ISOWeek -- ISO Week Format (Year-"W"Week-DayOfWeek)
Anything else?

Re: Date format "variables"

Posted: 30 Jun 2015 09:44
by bdeshi
  • f[ffffff] -- microseconds
  • c -- date and time

Re: Date format "variables"

Posted: 30 Jun 2015 10:17
by admin
echo <datem hh:nn am/pm>;
echo <datem hh:nn AM/PM>;

Re: Date format "variables"

Posted: 30 Jun 2015 13:03
by TheQwerty
  • c
    • System's short date and time format.
      This is equivalent to: ddddd ttttt
  • ttttt
    • Time in System's long time format.
  • q
    • Quarter of the year as a number (1-4).
  • ww
    • Week of the year.
      This uses Sunday as the first day of the week (or maybe it's locale specific?) unlike ISOWeek which uses Monday as the first day of the week.
  • y
    • Day of the year.
Format preceding time according to 12-hour clock and use the specified markers:
  • AM/PM
  • am/pm
  • A/P
  • a/p
  • AMPM
    • Uses the System/locale marker for AM and PM.
Predefined formats, as defined by the System/locale and application's current culture:
  • General Date
  • Long Date
  • Medium Date
  • Short Date
  • Long Time
  • Medium Time
  • Short Time
Additionally:
  • In a <date...> variable List will use the date column's format.
  • The m and mm patterns are "smart," if either is preceded by an hour format specifier then they become minute, instead of month.

    Code: Select all

    echo <date m mm h:m hh:mm>;

Re: Date format "variables"

Posted: 30 Jun 2015 13:24
by admin
Thanks, I learned something here.

Re: Date format "variables"

Posted: 30 Jun 2015 16:48
by Garonne
Awesome. Thanks.

Don, you might want to add that to the help file sometime...

EDIT: Damn... Had to revert to use /i in renaming anyways because EXIF doesn't store fractions of seconds, so <dateexif yyyy-mm-dd hh-nn-ss> isn't unique when taking photo-series (i.e. multiple shots per second) and (as noted) <dateexif yyyy-mm-dd hh-nn-ss.fff> doesn't work as fractions aren't saved.