标签: postgresql
我想获得每月的贷款数量,但我找不到将时间戳更改为月份名称的方法,每次都出现错误...
这是桌子 enter image description here
答案 0 :(得分:3)
如果您要查找月份的英文名称,可以使用 to_char 从时间戳中获取:
to_char
SELECT to_char(created, 'Month')
这是今天的样子:
SELECT to_char(now(), 'Month') as month; month ----------- March (1 row)