INVALID_FUNCTION_ARGUMENT: Invalid format: "13-12-2022" is malformed at "-12-2022"

0

【以下的问题经过翻译处理】 我正在尝试将一个字符串转换为日期。字符串的格式是13-12-2022(或例如4-12-2022)。我已经使用了以下查询:

,date_parse(Openingsdatum,'%d/%m/%Y')

其中Openingsdatum是日期字符串的列。我发现查询使用了%m%d%y的格式,因此进行了调整。有人可以解释一下我为什么会得到这个错误吗?

profile picture
EXPERT
asked 6 months ago53 views
1 Answer
0

【以下的回答经过翻译处理】 需要将/替换为-。我使用“13-12-2022”和“4-12-2022”运行下面的语句, 可以正常工作。

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions