gpt4 book ai didi

php - PostgreSQL 错误 : date/time field value out of range

转载 作者:可可西里 更新时间:2023-11-01 07:08:45 26 4
gpt4 key购买 nike

您好,我想在我的表格中插入一个日期。但我收到了错误。我也尝试了我发现的两种解决方案:

set datestyle to SQL,DMY;

set datestyle = dmy;

但是问题依然存在。请帮助我在哪里做错了。这是错误:

Error Number:

ERROR: date/time field value out of range: "24-07-2016" LINE 1: ...isalabad', E'Chief Executive ', E'1994-10-13', E'24-07-20... ^ HINT: Perhaps you need a different "datestyle" setting.

INSERT INTO "employee" ("fullname", "loginname", "email", "password", "phone", "cnic", "address", "jobdescription", "birthdate", "registered", "qualification", "lastcompany", "lastsalary", "status", "location", "department", "designation", "path") VALUES ( E'Shahzeb Akram', E'shaizi96', E'shaizi@test.com', E'1234', E'3137688894', E'33100-8398084-5', E'Faisalabad, Faisalabad', E'Chief Executive ', E'1994-10-13', E'24-07-2016', E'BSCS', E'BOLT', E'121212', E'1', '', E'39', E'43', E'http://localhost/department/uploads/Shahzeb Akram/Screenshot_(1).png')

Filename: C:/wamp/www/department/system/database/DB_driver.php

Line Number: 691

最佳答案

我必须将 html 输入标签中的日期格式更改为 Postgres 日期格式。感谢@Avision 告诉我如何查看 Postgres 使用的当前日期格式。

我更改了它,现在它工作正常:)

  <input type="text" data-date-format="mm-dd-yyyy" >

关于php - PostgreSQL 错误 : date/time field value out of range,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38550020/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com