In order to Extract date part from timestamp in postgresql we will first typecasting them to timestamp and then date. Let’s see how to
- Extract date part from timestamp in Postgresql
We will be using student_detail table.
Extract date part from timestamp in postgresql:
we will first typecasting them to timestamp and then to date as shown below
select *,birthdaytime :: timestamp :: date from student_detail
So the resultant dataframe with date extracted from timestamp will be