MySQL Forums
Forum List  »  Docs

Re: Timezone related fields in DATE_FORMAT() specifiers
Posted by: Athanasios Viennas
Date: March 21, 2020 12:41PM

To set the context of my question six different formats is a result of lack of standardisation in date headers mail clients put e.g.:

11 May 2018 22:28:51 +0300
Sun, 23 Feb 2020 02:01:31 -0600
Thu, 29 Mar 2018 21:36:14 +0000 (UTC)
Sat, 6 Jan 2018 06:17:51 GMT
Fri, 7 Jul 2017 18:03:11 +0800 (GMT+08:00)
Mon, 13 May 2019 18:31:16

Of course one approach is to get the normalised date prior to table insertion however that is not a good option as this is a lengthy process if we are talking about walking in many thousand logical rows in parsed e-mail messages.

The ideal choice would be to have a timezone specifier in STR_TO_DATE() and only have to identify the input pattern and pass a different specifier template for each case.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Timezone related fields in DATE_FORMAT() specifiers
632
March 21, 2020 12:41PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.