New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMESTAMP is incorrect CAST type for MySQL & MariaDB #1189
Comments
Further to this, the correct datetime format for mysql and mariadb differs from the default: sql_escape_datetime.DBIConnection <- function(con, x) {
x <- strftime(x, "%Y-%m-%dT%H:%M:%OSZ", tz = "UTC")
sql_escape_string(con, x)
} The correct format according to the docs (https://dev.mysql.com/doc/refman/8.0/en/datetime.html) is: sql_escape_datetime.MariaDBConnection <- function(con, x) {
x <- strftime(x, "%Y-%m-%d %H:%M:%OS", tz = "UTC")
sql_escape_string(con, x)
} |
Also related, (see the links in the first post), DOUBLE/FLOAT is the correct CAST type for numeric, not NUMERIC. |
Do you want to create a PR for this? 😄 |
Done 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to: #1011
DATETIME is the correct cast type:
https://mariadb.com/kb/en/cast/
https://dev.mysql.com/doc/refman/8.0/en/cast-functions.html#function_cast
The text was updated successfully, but these errors were encountered: