Bad date format under certain condition
See original GitHub issueSome weird conversion when format string contains single character, like
>>> sql
'SELECT TO_DATE(boo, "d-M-yyyy HH:mm:ss")'
>>> sqlglot.parse(sql, read='spark')
[(SELECT expressions:
(TSORDSTODATE this:
(COLUMN this:
(IDENTIFIER this: boo, quoted: False)), format:
(LITERAL this: %-d-%-m-%Y %H:%M:%S, is_string: True)))]
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
6 Ways to Fix Dates Formatted as Text in Excel
Step 3 of the Wizard: Choose 'Date' from the 'Column Data Format' options and choose your date format from the drop down list...
Read more >conditional formatting when wrong date format entered
Hello, I am working on a spreadsheet that records training records. the order of rules is as follows 1) If the cell is...
Read more >Excel conditional formatting for dates & time: formulas and rules
Excel conditional formatting for dates (built-in rules). Microsoft Excel provides 10 options to format selected cells based on the current date.
Read more >PHP Wrong Date Format When Using Under Condition
Problem is here: $date='' , In your conditional statement you are not just checking you are initializing a value that's why it will...
Read more >Error: Bad date format string - when previewing a Crystal Report
Usually the bad format error is generated when a formula is trying to convert a string type into a date type field but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixes in v5.1.2
Oh wow, thank you very much @tobymao !