Answer the question
In order to leave comments, you need to log in
How to write the current time in a column, with a specific format?
The following table is present:
CREATE TABLE platforms (
date_added time NOT NULL
) ;
Answer the question
In order to leave comments, you need to log in
In PosegreSQL, this is solved like this:
CREATE TABLE platforms (
id serial,
name varchar(64),
date_added TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
);
INSERT INTO platforms (name) VALUES ('Test platform');
SELECT * FROM platforms;
SELECT id, name, to_char(date_added, 'dd/mm/YYYY') FROM platforms;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question