SIMPOL Documentation

smtp_datestr()

Description

This returns the datetime object passed in valid SMTP date format. This depends on the format string passed. The format specification is quite extensive. The era portion is currently unsupported.

  • d – Numeric representation of the day of the month, without leading zeros

  • dd – Numeric representation of the day of the month, with leading zeros

  • ddd – Three-letter abbreviation for the day of the week

  • dddd – Full name of the day of the week

  • M – Numeric representation of the month, without leading zeros

  • MM – Numeric representation of the month, with leading zeros

  • MMM – Three-letter abbreviation for the name of the month

  • MMMM – Full name of the month

  • y – Year represented by only the last two digits, without leading zeros if less than 10

  • yy – Year represented by only the last two digits

  • yyyy – Year represented by all four digits

  • gg – Period/era string

  • h – Hours without leading zeros (12-hour clock)

  • hh – Hours with leading zeros (12-hour clock)

  • H – Hours without leading zeros (24-hour clock)

  • HH – Hours with leading zeros (24-hour clock)

  • m – Minutes without leading zeros

  • mm – Minutes with leading zeros

  • s – Seconds without leading zeros

  • ss – Seconds with leading zeros

  • t – One-character time-marker string (for example, "a" and "p")

  • tt – Multicharacter time-marker string (for example, "AM" and "PM")

Prototype

smtp_datestr ( datetime dt, string sFormat )

Parameters

ParameterDefault valueType nameDescription
dtNonedatetime
sFormatNonestring