DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

How I can trim seconds out of a timestamp in postgresql?

Want to trim seconds out of time value stored in #postgresql ?

Look here then:

In my postgresql I have the following table:

Name: mytable
---
id INT PRIMARY KEY,
time TIME WITHOUT TIME ZONE

And I select some info:

select id,time from mytable;

But I want the time to be formated without seconds. How I can do this?

Top comments (0)