-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve to_timestamp docs #8981
Improve to_timestamp docs #8981
Conversation
…ing adding missing link in the datafusion-examples/README file. Resolves apache#8980
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice thanks @Omega359 , please take care on doc formatting task
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much @Omega359 -- looks great 👍
@@ -90,20 +92,47 @@ async fn main() -> Result<()> { | |||
df.show().await?; | |||
|
|||
// use sql to convert a static string to a timestamp using a list of chrono formats to try | |||
let df = ctx.sql("select to_timestamp('01-14-2023 01:01:30+05:30', '%+', '%d-%m-%Y %H/%M/%S', '%m-%d-%Y %H:%M:%S%#z')").await?; | |||
// note that one of the formats is invalid ('%q') but since DataFusion will try all the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice -- thank you @Omega359
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Updated documentation concerning to_timestamp scalar function including adding missing link in the datafusion-examples/README file.
Which issue does this PR close?
Closes #8980.
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?