title: How do I convert date and seconds fields to a timestamp field in PostgreSQL?
body: <p>I have a date field, which is just text, and a field showing seconds since midnight. </p>
  
  <pre><code>CREATE TABLE t ("s" text, "d" text, "ts" timestamp)
  ;   
  INSERT INTO t ("s", "d")
  VALUES
      (24855, 20130604),
      (24937.7, 20130604)
  ;
  </code></pre>
  
  <p>How can I convert these fields into a timestamp, so I can run time-based queries?</p>
  
  <p>See a demo with SQL Fiddle:
  <a href="http://sqlfiddle.com/#!15/67018/2" rel="nofollow">http://sqlfiddle.com/#!15/67018/2</a></p>