postgresql怎么取年月日

2024-10-11 18:37:19

1、首先打印一下当前的时间,如下图所示

postgresql怎么取年月日

3、接下来加入month参数就是获取的月份,如下图所示

postgresql怎么取年月日

5、注意日期值可以是日期字符串,如下图所示

postgresql怎么取年月日

7、综上所述,在postgresql中获取年月日就是通过extract来实现,大家快去试试吧

猜你喜欢