Omega359 commented on issue #14536:
URL: https://github.com/apache/datafusion/issues/14536#issuecomment-2642764287
If you cast the date to a timestamp that would work, but the syntax you
provided would not match a date and thus it'll throw the format error. Any of
the following would work:
```sql
select to_char('2023-09-04'::date, '%Y-%m-%d');
select to_char('2023-09-04 00:00:00::timestamp, '%Y-%m-%dT%H:%M:%S%.3f');
select to_char(arrow_cast('2023-09-04'::date, 'Timestamp(Second, None)'),
'%Y-%m-%dT%H:%M:%S%.3f');
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]