Skip site navigation (1) Skip section navigation (2)

Re: VBA ADO Command Date Parameter Not Working

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Josh T <mortonjt(at)rochester(dot)rr(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: VBA ADO Command Date Parameter Not Working
Date: 2009-11-23 16:55:49
Message-ID: 396486430911230855n6f283472t90c04e02615c075f@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-odbc
on Mon, Nov 23, 2009 at 7:47 AM, Josh T <mortonjt(at)rochester(dot)rr(dot)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

In response to

Responses

pgsql-odbc by date

Next:From: Josh TDate: 2009-11-23 17:24:30
Subject: Re: VBA ADO Command Date Parameter Not Working
Previous:From: Jan-Peter SeifertDate: 2009-11-23 16:08:05
Subject: SSL timeout?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group