Versions Compared

Key

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

...

The parser will attempt to succeed in parsing a date time datetime even if you don't supply the entire order. The default order is always Year, Month, Day, Hour, Minute, and Second. If your format is just "D/M", then it will look for the day and month first, then it will look for the remaining components in the default order: Year, Hour, Minute, Second.

...

Code Block
languagebp
// Parse a datetime using the default format and the current locale as a guide
Datetime = SRP_DateTime("FormatParse", "1/14/2020 9:58 AM")

// Parse a datetime using the long format and the current locale as a guide
Datetime = SRP_DateTime("FormatParse", "Tuesday, January 14, 2020 9:58:22 AM", "Long")

// Parse a datetime using the long format and the Spanish language as a guide
Datetime = SRP_DateTime("FormatParse", "martes, 14 de enero de 2020 15:17:43", "Long", "es")

// Parse  a datetime using a custom format and the Spanish-MEXICAN language as a guide
Datetime = SRP_DateTime("FormatParse", "enero 14, 2020 at 3:17:43 p. m.", "MMMM D, YYYY 'at' h:mm:ss tt", "es-MX")

...