On 05/04/2013 01:22 PM, Kejia柯嘉 wrote:
Hi,

How should I construct a postgresql timestamp in terms of current time?

Thanks.

On the Racket side:

  (require db db/util/datetime (prefix-in srfi: srfi/19))
  (srfi-date->sql-timestamp-tz (srfi:current-date))

On the server side:

  (define c (postgresql-connect ___))
  (query-value c "select now()")

Ryan


____________________
 Racket Users list:
 http://lists.racket-lang.org/users

Reply via email to