错误:日期/时间字段值超出范围:" 30/12/2014 23:58:04" PostgreSQL的

时间:2015-03-31 17:10:57

标签: postgresql

我正在尝试将csv文件导入postgresql数据库

我已经尝试set datestyle = mdy

 \copy "Recon".snapdeal_sales (REFERENCES , ORDER_CODE ,SUB_ORDER_CODE ,    
  PRODUCT_NAME , ORDER_VERIFIED_DATE , ORDER_CREATED_DATE, AWBNO ,
  SHIPPING_PROVIDER , SHIPPING_CITY , SHIPPING_METHOD , INVOICE_NUMBER ,    
  INVOICE_DATE , IMEI_SERIAL , STATUS , MANIFEST_BY_DATE , SHIPPED_ON ,
  DELIVERED_ON , RETURN_INITIATED_ON , RETURN_DELIVERED_ON , SKU_CODE ,   
  PACKAGE_ID ,PRODUCT_CATEGORY, ATTRIBUTES , IMAGE_URL , PDP_URL , FREEBIES 
  ,TRACKING_URL , ITEM_ID , MANIFEST_CODE , PROMISED_SHIP_DATE , 
  NON_SERVICABLE_FROM , HOLD_DATE , HOLD_REASON , MRP 
  ,EXPECTED_DELIVERY_DATE ,TAX_PERCENTAGE , CREATED ,RPI_DATE 
  ,RPI_ISSUE_CATEGORY , RPR_DATE) FROM 'C:\Users\YAM\Documents\SALES.csv' DELIMITER ',' CSV HEADER;

1 个答案:

答案 0 :(得分:13)

首先,运行此查询。

  SET datestyle = dmy;