R
Railway9mo ago
$P

How do you put a time in a Postgres database?

Hello, I need help to be able to put a time in a column of a table in postgres, it appears as invalid date
29 Replies
Percy
Percy9mo ago
Project ID: 2d6389fb-0789-40df-b305-240ed5a8129a
$P
$P9mo ago
2d6389fb-0789-40df-b305-240ed5a8129a
Atrox
Atrox9mo ago
what data type are you using for your column?
$P
$P9mo ago
TIME Is that data type okay?
Atrox
Atrox9mo ago
probably, it does exist
$P
$P9mo ago
but I put for example 7:00 and it shows invalid date
Atrox
Atrox9mo ago
I think a regular timestamp might be easier to work with though
Atrox
Atrox9mo ago
PostgreSQL Documentation
8.5. Date/Time Types
8.5. Date/Time Types # 8.5.1. Date/Time Input 8.5.2. Date/Time Output 8.5.3. Time Zones 8.5.4. Interval Input 8.5.5. Interval Output PostgreSQL supports …
$P
$P9mo ago
thanks I see it now
Atrox
Atrox9mo ago
I think for TIME you might have to specify HH:MM:SS at a minimum for it to be valid or maybe HH:MM is enough
$P
$P9mo ago
I already tried and nothing, I have entered 7:00:00, 7:00, 7:00 UTC and invalid date appears
$P
$P9mo ago
will this be?
No description
$P
$P9mo ago
But what does the p mean or how does i can put in the table? Im new with postgres
Brody
Brody9mo ago
where are you inputting this data into your database
$P
$P9mo ago
in a time table with a column of type TIME
Brody
Brody9mo ago
yes but what software are you using
$P
$P9mo ago
software? im using railway in web
Brody
Brody9mo ago
the data tab is only meant to give you a general overview of your data, do not use it for data entry
$P
$P9mo ago
ohh, and how can I do it?
$P
$P9mo ago
I'm doing it here
No description
$P
$P9mo ago
where invalid date is is where I'm trying to put a time
Brody
Brody9mo ago
use database software like pgadmin
$P
$P9mo ago
So I can't add an hour there only if I have pgadmin?
Brody
Brody9mo ago
the data tab is only meant to give you a general overview of your data, use pgadmin for data entry
$P
$P9mo ago
ok, thank you very much, I'm already downloading it After i download it, just set a time like 7:00 and it would be ready?
Brody
Brody9mo ago
yes it will
$P
$P9mo ago
Here is it the remote access option or the other one?
No description
Brody
Brody9mo ago
remote
$P
$P9mo ago
okey