Can any body tell how to remove or skip the millisecond part while inserting the current time to the timestamp column in Postgres database table. Actually the column that holds the data type timestamp without timezone
and default is set to now()
i.e. it will take the current date and time.
It inserts right date and time but it puts the millisecond part for example the format that gets entered is "2015-01-07 10:27:44.234534" which has millisecond part i.e 234534 which I don't want to be inserted. I only want the the data that is to be inserted is as "2015-01-07 10:27:44". Can any body let me know without changing the data type of that column how to insert the current date and time skipping the millisecond part.