Re: substring .. - Mailing list pgsql-sql

From Josh Berkus
Subject Re: substring ..
Date
Msg-id 3A3FBFB6.B69DA37E@agliodbs.com
Whole thread Raw
In response to substring ..  (Jeff MacDonald <jeff@hub.org>)
List pgsql-sql
Jeff,

> i want to do this to a datetime field..
> 
> select foo from table where substr(datefoo,1,11) = '2000-12-14';
> 
> it returns no results yet..
> 
> select substr(datefoo,1,11) does return some values that say
> 2000-12-14

Well, for one it's not a string, it's a datetime field.

WHy are you trying to substring a datetime field, anyway?
                -Josh 

-- 
______AGLIO DATABASE SOLUTIONS___________________________                                       Josh Berkus  Complete
informationtechnology      josh@agliodbs.com   and data management solutions       (415) 436-9166  for law firms, small
businesses      fax  436-0137   and non-profit organizations.       pager 338-4078                               San
Francisco


pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: substring ..
Next
From: "Joel Burton"
Date:
Subject: Re: substring ..