简体   繁体   English

在Postgresql中存储格式为yyyy-mm-dd hh:mm:ss的日期的数据类型

[英]Datatype to store date of format yyyy-mm-dd hh:mm:ss in postgresql

I am not knowing which datatype to be assigned to the data of format yyyy-mm-dd hh:mm:ss? 我不知道将哪种数据类型分配给yyyy-mm-dd hh:mm:ss格式的数据? I use postgresql database. 我使用postgresql数据库。

You're looking for timestamp (with or without timezone, with timezone preferred to store the actual data) 您正在寻找timestamp (带或不带时区,首选时区来存储实际数据)

See PostgreSQL's documentation on Date/Time Types 请参阅有关日期/时间类型的PostgreSQL文档

暂无
暂无

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

相关问题 以oracle和PostgreSQL查询以yyyy-MM-dd'T'HH:mm:ss.SSSZ格式打印日期 - Query to print date in yyyy-MM-dd'T'HH:mm:ss.SSSZ format in oracle and postgresql 将秒转换为 yyyy-mm-dd hh:mm:ss PostgreSQL - Convert seconds to yyyy-mm-dd hh:mm:ss PostgreSQL Sequelize 如何将日期格式化为 YYYY-MM-DD HH:mm:ss 并将列保持为蛇形 - Sequelize How do you format date to YYYY-MM-DD HH:mm:ss and keep the columns as snake case 如何转换为日期时间YYYY-MM-DD HH:mi:ss - How to Convert to Datetime YYYY-MM-DD HH:mi:ss 如何在 Postgres 中将 YYYY-MM-DDTHH:mm:ss.SSSZ 时间戳转换为 YYYY-MM-DD HH:mm:ss - How to convert YYYY-MM-DDTHH:mm:ss.SSSZ timestamp to YYYY-MM-DD HH:mm:ss in Postgres 有没有办法在postgresql中将dd-mm-yyyy格式的varchar列转换为yyyy-mm-dd格式的日期列? - Is there a way to convert a varchar column in dd-mm-yyyy format to a date column in yyyy-mm-dd format in postgresql? 如何在 PostgreSQL 中存储混合的部分日期,格式可以是 yyyy-mm-dd、yyyy-mm 或 yyyy? - How to store a mix of partial dates in PostgreSQL, which format can be yyyy-mm-dd, yyyy-mm or yyyy? PostgreSql +日期格式将YYYY-MM-DD转换为日期,日期月份年份 - PostgreSql + Date Format Convert YYYY-MM-DD to Day, Date Month Year 如何通过 'YYYY-MM-DD' 日期格式传递给 postgresql 槽棱镜客户端? - How to pass 'YYYY-MM-DD' date format to postgresql trough prisma client? 将 TEXT 转换为日期 ('yyyy-mm-dd') 格式时输出不正确 (Postgresql) - Incorrect Output when converting TEXT to Date ('yyyy-mm-dd') format (Postgresql)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM