Skip to content

[Bug] The cast function does not convert string to date/datetime as expected #35635

@yongjinhou

Description

@yongjinhou

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.0.9 & master

What's Wrong?

select cast("123.123" as date);

实际值: None

期望值: 2012-03-12

select cast("123.123" as datetime)

实际值: None

期望值: 2012-03-12 03:00:00

What You Expected?

结果为期望值而不是None

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions