Function: formatDateTimeByString()
formatDateTimeByString(
dateString,formatter?):string
Formats a date string into a specified date time format
Parameters
dateString
string
A string representing the date.
formatter?
string
Optional. A specific format string to format the date. Defaults to 'YYYY-MM-DD HH:mm:ss'.
Returns
string
The formatted date string.
Throws
Throws an error if the date string is invalid or cannot be parsed into a Date object.
