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

Re: substring ..

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: sqllist <pgsql-sql(at)postgresql(dot)org>
Subject: Re: substring ..
Date: 2000-12-19 20:06:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

> 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?


______AGLIO DATABASE SOLUTIONS___________________________
                                        Josh Berkus
   Complete information technology      josh(at)agliodbs(dot)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

In response to

pgsql-sql by date

Next:From: Stephan SzaboDate: 2000-12-19 20:07:33
Subject: Re: substring ..
Previous:From: Jeff MacDonaldDate: 2000-12-19 19:06:47
Subject: substring ..

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