Postgresql: get day from date

Trabla: Postgresql: get day from date

Solving:

1. From Date

select date_part( 'day' , date '2015-02-16') 

Result: 16

2. From Timestamp

select date_part( 'day' , timestamp '2015-02-16 20:38:40')

Result: 16

No comments:

Post a Comment