pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpsql dates in Access
4+ messages / 3 participants
[nested] [flat]
* psql dates in Access
@ 2003-03-23 19:51 Fred Parkinson <FredP@abag.ca.gov>
2003-03-23 20:44 ` Re: psql dates in Access John K. Herreshoff <jkherr@centurytel.net>
0 siblings, 1 reply; 4+ messages in thread
From: Fred Parkinson @ 2003-03-23 19:51 UTC (permalink / raw)
To: pgsql-odbc
in postgres 7.2
Using the postgres timestamp with timezone, I can't seem to extract records using Access and requesting a range of dates, unless the date is hard-coded into the Access query.
I want to reference a range of dates that a user has entered on a form.
I have referenced to user-entered dates with and without the date bracketed by "#".
In the date range I submit to the query I have referenced the full time stamp string where I construct the start date as "xx/xx/xx 12:00:00 AM" and the end date as "xx/xx/xx 12:59:59 PM" (not the same xx/xx/xx obvioulsy)
I have referenced the dates with and without the double quotes.
I have referenced only the left 10 characters of the dates, i.e., the day part.
When I manually enter the desired dates into the query before saving, then running, it works.
When I try any of the above ways to reference a date from a form, the query results are always empty.
Any ideas?
Thanks
Fred Parkinson
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql dates in Access
2003-03-23 19:51 psql dates in Access Fred Parkinson <FredP@abag.ca.gov>
@ 2003-03-23 20:44 ` John K. Herreshoff <jkherr@centurytel.net>
0 siblings, 0 replies; 4+ messages in thread
From: John K. Herreshoff @ 2003-03-23 20:44 UTC (permalink / raw)
To: pgsql-odbc
Try without time zone; that should work.
John.
On Sunday 23 March 2003 02:51 pm, Fred Parkinson wrote:
> in postgres 7.2
> Using the postgres timestamp with timezone, I can't seem to extract records
> using Access and requesting a range of dates, unless the date is hard-coded
> into the Access query.
>
> I want to reference a range of dates that a user has entered on a form.
> I have referenced to user-entered dates with and without the date bracketed
> by "#". In the date range I submit to the query I have referenced the full
> time stamp string where I construct the start date as "xx/xx/xx 12:00:00
> AM" and the end date as "xx/xx/xx 12:59:59 PM" (not the same xx/xx/xx
> obvioulsy) I have referenced the dates with and without the double quotes.
> I have referenced only the left 10 characters of the dates, i.e., the day
> part.
>
> When I manually enter the desired dates into the query before saving, then
> running, it works. When I try any of the above ways to reference a date
> from a form, the query results are always empty.
>
> Any ideas?
> Thanks
> Fred Parkinson
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql dates in Access
@ 2003-03-23 20:50 Fred Parkinson <FredP@abag.ca.gov>
2003-03-23 21:01 ` Re: psql dates in Access Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Fred Parkinson @ 2003-03-23 20:50 UTC (permalink / raw)
To: jkherr@centurytel.net; pgsql-odbc
I will look into that, but I seem to recall that when we were setting up the databases in postgres a couple of months ago, that if we left the time zone off then access didn't recognize the field as a date/time field
Thanks for responding
Fred
>>> "John K. Herreshoff" <jkherr@centurytel.net> 03/23/03 12:44PM >>>
Try without time zone; that should work.
John.
On Sunday 23 March 2003 02:51 pm, Fred Parkinson wrote:
> in postgres 7.2
> Using the postgres timestamp with timezone, I can't seem to extract records
> using Access and requesting a range of dates, unless the date is hard-coded
> into the Access query.
>
> I want to reference a range of dates that a user has entered on a form.
> I have referenced to user-entered dates with and without the date bracketed
> by "#". In the date range I submit to the query I have referenced the full
> time stamp string where I construct the start date as "xx/xx/xx 12:00:00
> AM" and the end date as "xx/xx/xx 12:59:59 PM" (not the same xx/xx/xx
> obvioulsy) I have referenced the dates with and without the double quotes.
> I have referenced only the left 10 characters of the dates, i.e., the day
> part.
>
> When I manually enter the desired dates into the query before saving, then
> running, it works. When I try any of the above ways to reference a date
> from a form, the query results are always empty.
>
> Any ideas?
> Thanks
> Fred Parkinson
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql dates in Access
2003-03-23 20:50 Re: psql dates in Access Fred Parkinson <FredP@abag.ca.gov>
@ 2003-03-23 21:01 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2003-03-23 21:01 UTC (permalink / raw)
To: Fred Parkinson <FredP@abag.ca.gov>; +Cc: jkherr@centurytel.net; pgsql-odbc
"Fred Parkinson" <FredP@abag.ca.gov> writes:
> When I manually enter the desired dates into the query before saving,=20
> then<BR>> running, it works. When I try any of the above ways to referen=
> ce a=20
> date<BR>> from a form, the query results are always empty.<BR>><BR>&g=
> t;=20
[please turn off MIME encoding in list mail...]
It seems likely to me that the query arriving at the backend is not what
you think it is. I'd suggest turning on query logging (see
postgresql.conf) so that you can see what's really being issued. IIRC,
there are also logging provisions in the ODBC driver, which would give
you an additional view of what's happening.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2003-03-23 21:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-23 19:51 psql dates in Access Fred Parkinson <FredP@abag.ca.gov>
2003-03-23 20:44 ` John K. Herreshoff <jkherr@centurytel.net>
2003-03-23 20:50 Re: psql dates in Access Fred Parkinson <FredP@abag.ca.gov>
2003-03-23 21:01 ` Tom Lane <tgl@sss.pgh.pa.us>
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