How to get the date and time only up to minutes, not seconds, from timestamp in PostgreSQL. I need date as well as time.
2000-12-16 12:21 (no seconds and milliseconds only date and time in hours and minutes)
There are plenty of date-time functions available with postgresql:
See the list here
SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40'); Result: 16
For formatting you can use these:
select to_char(current_timestamp, 'YYYY-MM-DD HH24:MI') ...