0

I have a XML XML that we download from a health board.

The date stamp formatted as a string 'Mon, 22 Mar 2021 20:50:32 GMT' Is there a way to get the proper date on this, when I try using either

CONVERT(BathroomTotal,UNSIGNED) or Str_to_date(LastUpdated,'%M/%d/%Y)

it returns null values - so i am assuming that the initial format is the cause of the issue.

Any help will be appreciated

Tahnks RB

  • Yes, the format of the string you are converting doesn't match '%M/%d/%Y that you are using. You need to make that second argument to str_to_date match the string you're converting. See https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_str-to-date – Andy Lester Mar 25 '21 at 17:08
  • Went to fix title and I got an error it already exists, so see here someone asked same question, or at least same title): https://stackoverflow.com/questions/10382197/mysql-date-conversion – Brad Mar 25 '21 at 17:09

0 Answers0