Re: Evidently no support for the mmddyyyy date format

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: bfb21(at)comcast(dot)net
Cc: pgsql-general(at)postgresql(dot)org, rod(at)iol(dot)ie
Subject: Re: Evidently no support for the mmddyyyy date format
Date: 2009-04-10 16:19:27
Message-ID: 2121634968.78041239380367754.JavaMail.root@sz0030a.emeryville.ca.mail.comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

----- bfb21(at)comcast(dot)net wrote:

> This is embedded SQL in a .pgc file. You can see the "c_docket_date
> between :date1 and :date2" line in the select statement, which is
> where the dates are porcessed. If I pass a date in the mm-dd-yyyy
> format it works. However, the application I'm porting is all based on
> dates in the mmddyyyy format.
>
> I'm 99% cerain that PostgreSQL will NOT support dates in the mmddyyyy
> format, unless you use the to_date function, which I'm trying to
> avoid.
>
>
> select
> c_jnum_prefix, c_jnum_seq, c_jnum_year, c_jnum_suffix, c_jnum_venue
> ,c_actkey, c_disp_cd
> into
> :prfx, :seq, :yr, :sfx, :ven, :actkey, :disp
> from
> c_records
> where
> c_jnum_prefix = :prfx
> and
> c_jnum_seq between :seq1 and :seq2
> and
> c_jnum_venue = :ven
> and
> c_docket_date between :date1 and :date2
> order by
> c_jnum_prefix,c_jnum_seq,c_jnum_year,
> c_jnum_suffix,c_jnum_venue;
>
>

I might be missing something, but could you not preprocess the :date1 and :date2 variables before passing them to the SQL code above.

Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2009-04-10 16:31:55 Re: Multiple character encodings within a single database/table?
Previous Message A.M. 2009-04-10 15:44:13 Re: Querying a Large Partitioned DB