howdoi works perfectly and deterministically and has proper attributes (use -a to get a full answer from StackOverflow)
the following are calls directly from Windows Terminal, but porting this to Mac should be a matter of a few lines in zsh profile
howdoi format date in Postgres to yyyy-mm-dd >>> SELECT to_char("date", 'DD/MM/YYYY') FROM mytable;
openAI gives me a similar answer, though
▶ ask how to format date to YYYY-MM-DD in Redshift You can use the TO_CHAR function to format a date to YYYY-MM-DD in Redshift. The syntax is as follows: