1
Hello, I’m trying to remove "BC" from sql dates but I’m not getting.
I’ll tell you what:
SELECT CAST("regiaulaavul_dataInicio" AS date) FROM "RegistroAulaAvulsa"
And eventually return me the date with a BC (Before Christ) in front. I would like to remove it to compare with the current date, which does not bring the BC. Making comparisons between both returns incorrect result.
Thank you,
Lucas Kunze.
Try this:
SELECT DATE_FORMAT(regiaulaavul_dataInicio, '%M %d, %Y') FROM RegistroAulaAvulsa
– R.Santos
Thanks for the help, I searched something compatible with DATE_FORMAT for postgres and found to_char, so I converted it to date and it worked.
– Lucas_Kunze
Glad I helped, if possible post your solution to help those next who have this doubt
– R.Santos