Search Postgresql Archives

Truncating 'now' to seconds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to run the following query:

INSERT INTO public."Bug Status" ("Tracking Number", "Assigned Analyst", status, "Changed By", "Updated Date") VALUES
(111111111, 'NS', 'Reported', 'NS', DATE_TRUNC('second', 'now'));


I recieve the following error:

ERROR:  unterminated string
CONTEXT:  compile of PL/pgSQL function "update_status" near line 3

I am basically wanting to truncate the timestamp to seconds, so that I don't get milliseconds. Does anyone know what I am doing wrong? Thanks

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux