pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma <richard.broersma@gmail.com>
To: Josh T <mortonjt@rochester.rr.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: VBA ADO Command Date Parameter Not Working
Date: Mon, 23 Nov 2009 08:55:49 -0800
Message-ID: <396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com> (raw)
In-Reply-To: <4B0AAE9D.9030201@rochester.rr.com>
References: <4B0AAE9D.9030201@rochester.rr.com>

on Mon, Nov 23, 2009 at 7:47 AM, Josh T <mortonjt@rochester.rr.com> wrote:
>  What is the correct way to pass a date into a parameter so it gets
> into the database correctly?

http://www.postgresql.org/docs/8.4/interactive/datetime-appendix.html

This is how Postgresql accepts dates by default.  There is a way to change this:

http://www.postgresql.org/docs/8.4/interactive/datatype-datetime.html#DATATYPE-DATETIME-INPUT
http://www.postgresql.org/docs/8.4/interactive/runtime-config-client.html#GUC-DATESTYLE

> [5.750]conn=03044168, query='INSERT INTO test_table (test_date) VALUES
> ('1900-05-07'::date);'

It looks like the ODBC driver is make the conversion here.
Rather than passing the date in with the #...#.  Could you pass it in
as a string?

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug



view thread (7+ messages)  latest in thread

Message-ID: <396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com>
Permalink:  ../396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com/
Also on:    postgresql.org/message-id/396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: richard.broersma@gmail.com, mortonjt@rochester.rr.com
  Subject: Re: VBA ADO Command Date Parameter Not Working
  In-Reply-To: <396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com>
  References: <4B0AAE9D.9030201@rochester.rr.com> <396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox