Re: dateformat issue

From: Tk421 <vrobador(at)gmail(dot)com>
To: Gavin 'Beau' Baumanis <gavinb(at)eclinic(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: dateformat issue
Date: 2008-04-10 11:19:42
Message-ID: 47FDF7CE.3090909@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gavin 'Beau' Baumanis escribió:
> Hi Everyone,
>
> I have a question about dates, please.
>
> I am using Coldfusion and Postgres
> I have a function that takes the ate entered in a form and converts it
> into an odbc date format.
>
> So the string ends up being;
> {d '2008-04-10'}
>
> Strangely, the function is used throughout the application and causes
> no issues but on one particular template.
> And this same templates is replicated for other clients - that
> seemingly have no issue .
>
>
> The SQL is simply
>
> Insert into table (datefield) values ({d '2008-04-10'})
>
> Now, I have read the docs and do not see the {d '2008-04-10'} format
> as being a valid date data type...
> But it works elsewhere in the application / on other sites - thus my
> current state of confusion.
>
> Thanks in advance for any ideas you might have.
>
>
>
> Please contact me if you should have any questions.
>
> Gavin 'Beau' Baumanis
> Senior Application Developer
> PalCare Pty. Ltd.
>
> E: beau(at)palcare(dot)com(dot)au
> T: +61 -3 9318 4567
> M: +61 -4 38 545 586
> W: http://www.palcare.com.au
>
I had some similar probles with dates, and i solved it using a
string format (yyyymmdd) to set date format, and two functions (toString
and toDate) made by myself inf the necesary language (asp, php, jsp....)

This format is full valid for comparations (>, <, =) and orders in
SQL. The only problem is to work in your application, but it may be
solved with some functions

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Martin Edlman 2008-04-10 11:34:06 Re: pl/PgSQL, variable names in NEW
Previous Message Aarni Ruuhimäki 2008-04-10 07:27:24 Re: dateformat issue