我的時間值爲2017-05-25T18:44:56
。以下是我的表結構TimeStamp錯誤+ postgresql + node.js
CREATE TABLE aaaaaa (
enroll_id bigserial primary key,
time timestamp with time zone NOT NULL
);
當我插入上述值進入時間列其引發以下錯誤{ error: syntax error at or near "T18"}
我怎樣才能解決這個問題?請分享你的想法。提前致謝。
我插入查詢:
var query = 'Insert Into aaaaa (enroll_id, time,) values ('+item.EnrollNumber+', '+item.time+')';
它說語法錯誤在查詢中。在此分享您的插入查詢。 –
另外,你使用什麼軟件包? –
我已經成功將值插入到表中,所以它不是postgresql錯誤。您始終可以將時間戳值轉換爲時間戳。 – Lemjur