Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

sql: support more timestamp formats #480

Merged

Conversation

jfontan
Copy link
Contributor

@jfontan jfontan commented Oct 19, 2018

MySQL supports multitude of formats to parse datetime data. Not all
formats are supported as some of them require changing the way of
parsing as they support any separator.

Information about datetime parsing can be found here:

https://github.com/MariaDB/server/blob/mysql-5.5.36/sql-common/my_time.c#L124

  DESCRIPTION
    At least the following formats are recogniced (based on number of digits)
    YYMMDD, YYYYMMDD, YYMMDDHHMMSS, YYYYMMDDHHMMSS
    YY-MM-DD, YYYY-MM-DD, YY-MM-DD HH.MM.SS
    YYYYMMDDTHHMMSS  where T is a the character T (ISO8601)
    Also dates where all parts are zero are allowed
    The second part may have an optional .###### fraction part.

MySQL supports multitude of formats to parse datetime data. Not all
formats are supported as some of them require changing the way of
parsing as they support any separator.

Information about datetime parsing can be found here:

https://github.com/MariaDB/server/blob/mysql-5.5.36/sql-common/my_time.c#L124

Signed-off-by: Javi Fontan <jfontan@gmail.com>
@jfontan jfontan requested a review from a team October 19, 2018 11:05
@ajnavarro ajnavarro merged commit 8796d13 into src-d:master Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy