Reputation: 8420
I have this query:
SELECT hora FROM table;
I got "09:45:00"
Now, I'm trying to get the hour from that timestamp, and I'm trying:
SELECT TO_CHAR(hora,'HH24'), hora FROM table;
I was expecting: 9 | 09:45:00
But I got this error:
Undefined function: 7 ERROR: function doesn't exist to_char(character varying, unknown)
What I'm doing wrong?
Upvotes: 1
Views: 3538