I know the data types are TIMESTAMP, DATE, TIME, etc. I also know I should be using TIMESTAMP as it keeps track of any changes.
I am bringing the date from the front-end where in my react component the date is
const dateTime = new Date().toLocaleString("en-GB")
The output of which is "24/10/2021, 14:37:49"
If I set the data type to TIMESTAMP it gives me an error.
The question is what should be the data type to accept the above mentioned date and time format. I have tried DATETIME but it gives an error saying DATETIME does not exist. SQL query:
ALTER TABLE user_info_2 ADD date_col1 TIMEDATE;
I am new at PostgreSQL so any help is appreciated.