简体   繁体   English

选择时日期列被截断

[英]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.相关文件是CSV,使用复制命令插入成功。

When I select against the column from "dbeaver" the output reflects:当我 select 针对来自“dbeaver”的列时,output 反映:

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.我更改了 DDL 以将日期数据类型换成时间戳,并使用 psql 来验证它是否解决了问题。 Thank you to all that answered.感谢所有回答的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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