Create PostgreSQL Database Timestamp Field without Milisecond on PhpPgAdmin
You may have know the default “timestamp without timezone” data type in PostgreSQL come with milisecond. The data will look like;
If you want to cast away the miliseconds at the back, you can create the table with “timestamp (0) without time zone” instead of “timestamp without time zone”. Here is an example of the table;
CREATE TABLE show_the_time ( id serial not null, time timestamp (0) without time zone default now(), timeagain timestamp without time zone default now() );
We insert the data and it looks like this;
To create the similar table in PhpPgAdmin, follow as below;
If you have an existing table, you can alter the table type as shown about, it will cast again the milisecond at the end of the timestamp data.