简体   繁体   中英

date column truncated when selected against

I am inserting the below values into a column with a "date" datatype.

2021-09-20 06:19:00
2021-09-20 12:22:00

The related file is a CSV and inserts successfully using the copy command.

When I select against the column from "dbeaver" the output reflects:

2021-09-20
2021-09-20

The time is missing.

Is the time there really, but there is some format mask I need to use to display it or, am I using the wrong datatype and the value is truncated at insert?

I changed the DDL to swap out the date datatype for timestamp and used psql to verify that it resolved the issue. Thank you to all that answered.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM