From jfradkin@wazagua.com Thu Aug 18 20:36:01 2005 X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4E8952899; Thu, 18 Aug 2005 17:36:01 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37124-03; Thu, 18 Aug 2005 20:35:56 +0000 (GMT) Received: from svctag-ckgvz71.mailserver.wazagua.com (unknown [209.34.245.244]) by svr1.postgresql.org (Postfix) with ESMTP id 893DE52A1E; Thu, 18 Aug 2005 17:35:52 -0300 (ADT) Received: from jfradkin ([66.15.127.235]) by svctag-ckgvz71.mailserver.wazagua.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 18 Aug 2005 16:34:25 -0400 From: "Joel Fradkin" To: , Subject: dates and selection Date: Thu, 18 Aug 2005 16:36:28 -0400 Message-ID: <004c01c5a434$82d6ff70$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_004D_01C5A412.FBC55F70" X-OriginalArrivalTime: 18 Aug 2005 20:34:25.0156 (UTC) FILETIME=[39012C40:01C5A434] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.888 required=5 tests=[AWL=-0.189, HTML_MESSAGE=0.001, MSGID_DOLLARS=3.076] X-Spam-Level: ** X-Archive-Number: 200508/159 X-Sequence-Number: 5798 This is a multi-part message in MIME format. ------=_NextPart_000_004D_01C5A412.FBC55F70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 ------=_NextPart_000_004D_01C5A412.FBC55F70 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

After my conversion to Unicode and implementing new = drivers (Thank god still up no down time J) 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

 

 

------=_NextPart_000_004D_01C5A412.FBC55F70-- From josh@agliodbs.com Fri Aug 19 04:17:23 2005 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1F33B52965 for ; Fri, 19 Aug 2005 01:17:23 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 36636-03 for ; Fri, 19 Aug 2005 04:17:20 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 253FA52917 for ; Fri, 19 Aug 2005 01:17:19 -0300 (ADT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7761275; Thu, 18 Aug 2005 21:19:35 -0700 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-sql@postgresql.org Subject: Re: dates and selection Date: Thu, 18 Aug 2005 21:18:21 -0700 User-Agent: KMail/1.8 Cc: "Joel Fradkin" References: <004c01c5a434$82d6ff70$797ba8c0@jfradkin> In-Reply-To: <004c01c5a434$82d6ff70$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508182118.21267.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 required=5 tests=[AWL=0.012] X-Spam-Level: X-Archive-Number: 200508/156 X-Sequence-Number: 22384 Joel, > 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) Um, what's wrong with: to_char(some_timestamp, 'Mon DD YYYY HH:MI:SS') ? -- Josh Berkus Aglio Database Solutions San Francisco