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

dates and selection

From: "Joel Fradkin" <jfradkin(at)wazagua(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: dates and selection
Date: 2005-08-18 20:36:28
Message-ID: 004c01c5a434$82d6ff70$797ba8c0@jfradkin (view raw or flat)
Thread:
Lists: pgsql-odbcpgsql-sql
After my conversion to Unicode and implementing new drivers (Thank god still
up no down time :-)) I do have an issue with some of my sql selects
concerning dates.

 

I know the long answer, but am asking if there is a short one.

 

I have in some of my slq :

(to_char(e.incidentdate, 'Mon DD YYYY'::text) || ' '::text) ||
e.incidenttime::text  as incidentdate

 

I used to be able to sort and select by incident date and it was working ok
(I think).

 

Now I found I had to do something like this just to have a timestamp
(problem is I do not want the format of the time stamp, my clients want to
see the month as a string)

((to_char(e.incidentdate, 'Mon DD YYYY'::text) || ' '::text) ||
e.incidenttime::text)::timestamp  as datetoselectby

 

Is there any way to reference the text type variable as a date selection?
(was this ever working or was I hallucinating).

 

Many thanks for all the help.

 

Joel Fradkin

 

 

Responses

pgsql-odbc by date

Next:From: Joel FradkinDate: 2005-08-18 20:38:36
Subject: nevermind answered my own question by looking at my question what a DOH!
Previous:From: Merlin MoncureDate: 2005-08-18 17:56:49
Subject: Re: Conexion posgresql con Oracle

pgsql-sql by date

Next:From: Joel FradkinDate: 2005-08-18 20:38:36
Subject: nevermind answered my own question by looking at my question what a DOH!
Previous:From: Tom LaneDate: 2005-08-18 20:08:42
Subject: Re: A Table's Primary Key Listing

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