Converts a U.S. short date string ('10/31/2022') to date time string format ('2022-10-31'). The output format is specified here https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-date-time-string-format and also matches the hyphenated ISO 8601 date format.

An error if the input format is invalid.

  • Parameters

    • usShortDate: string

      The date in 'mm/dd/yyyy' format - e.g. '02/05/1995'

    Returns string

    The date in date time string format - e.g. '1995-02-05'