get month name from timestamp column postgresql

Viewed 149

I wanna get the number of loans per month but I can't find a way to change the timestamp to month name, I get an error every time...

Here is the table enter image description here

1 Answers

If you're looking for the English name of the month, you can get it from your timestamp using to_char:

SELECT to_char(created, 'Month')

This is what it looks like for today:

SELECT to_char(now(), 'Month') as month;
   month
-----------
 March
(1 row)
Related