Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ArgumentTypeDescription
valueAnyValue to be converted.
dateFormatStringAn optional parameter which is a date format pattern Date and Time Format Patterns. PhixFlow will check if the value parameter is a date or can be converted to a date. If the value parameter cannot be converted to a date then an error will be thrown.

If this parameter is not used and a date object is passed into the value parameter, PhixFlow will use the default format of "yyyyMMdd.HHmmss"

...

Returns the time zone offset/id of the date. This is the string "+0000" for a UK date.

Date Format Pattern

The following values are available for use in dateFormat patterns:

...

...

The number of letters used in the pattern determines the format.

  • Text: If the number of pattern letters is 4 or more, the full form is used; otherwise a short or abbreviated form is used if available.
  • Number: The minimum number of digits. Shorter numbers are zero-padded to this amount.
  • Year: Numeric presentation for year and weekyear fields are handled specially. For example, if the count of 'y' is 2, the year will be displayed as the zero-based year of the century, which is two digits.
  • Month: 3 or over, use text, otherwise use number.
  • Zone: 'Z' outputs offset without a colon, 'ZZ' outputs the offset with a colon, 'ZZZ' or more outputs the zone id.
  • Zone names: Time zone names ('z') cannot be parsed.
  • Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance, characters like ':', '.', ' ', '#' and '?' will appear in the resulting time text even they are not embraced within single quotes.

See Also