Re: VBA ADO Command Date Parameter Not Working - Mailing list pgsql-odbc

From Richard Broersma
Subject Re: VBA ADO Command Date Parameter Not Working
Date
Msg-id 396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com
Whole thread Raw
In response to VBA ADO Command Date Parameter Not Working  (Josh T <mortonjt@rochester.rr.com>)
Responses Re: VBA ADO Command Date Parameter Not Working  (Josh T <mortonjt@rochester.rr.com>)
List pgsql-odbc
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

pgsql-odbc by date:

Previous
From: Josh T
Date:
Subject: VBA ADO Command Date Parameter Not Working
Next
From: Josh T
Date:
Subject: Re: VBA ADO Command Date Parameter Not Working