title: Postgres timestamp formatting in query
body: <p>I am migrating a code with its own ORM from Db2 to postgres. I have a query that executes the following sql on postgres 10 -</p>
  
  <pre><code>SELECT * FROM TriggerQueue 
  WHERE  TriggerQueue.atServerStartup = 'Y' 
  AND (TriggerQueue.scheduledatetime &gt; '2018-06-21 20.02.57.827' OR 
  TriggerQueue.scheduleDateTime is null) AND TriggerQueue.inputQueue = 'N'
  </code></pre>
  
  <p>but the pgadmin is showing the following error:</p>
  
  <pre><code>ERROR:  invalid input syntax for type timestamp: "2018-06-21 
  20.02.57.827"
  LINE 3: AND (TriggerQueue.scheduledatetime &gt; '2018-06-21 20.02.57.8...
                                               ^
  SQL state: 22007
  </code></pre>
  
  <p>I'm guessing the timestamp format is wrong based on sql state, but I'm not sure how to format the value. Any insight on this would be very helpful.</p>
  
  <p>EDIT : Timestamp field in pg is of the type timestamp without timezone. Pgadmin shows size of 6.</p>