List:General Discussion« Previous MessageNext Message »
From:Claudia M. Castaneda Date:May 25 1999 6:47pm
Subject:Re: Dates querying Mysql
View as plain text  
Well, it worked!!

mysql> select obs_id, obs_URI, obs_source, beg_date, beg_time from
observation where beg_date+0 between 19990120 and 19990530;
+--------+------------------------------------+------------+------------+----------+
| obs_id | obs_URI                            | obs_source | beg_date   |
beg_time |
+--------+------------------------------------+------------+------------+----------+
|      4 | URIRAC://landsat-7/19990419/120850 | landsat-7  | 1999-04-19 |
12:08:50 |
|      3 | URIRAC://landsat-7/19990519/90850  | landsat-7  | 1999-05-19 |
09:08:50 |
|      2 | URIRAC://landsat-7/19990519/90850  | GOES-J     | 1999-05-19 |
09:08:50 |
|      1 | URIRAC://noaa-14/19990124/90850    | noaa-14    | 1999-01-24 |
09:08:50 |
|      5 | URIRAC://landsat-7/19990419/120850 | landsat-7  | 1999-04-19 |
12:08:50 |
|      6 | URIRAC://goes-j/19990202/111250    | goes-j     | 1999-02-02 |
11:12:50 |
+--------+------------------------------------+------------+------------+----------+
6 rows in set (0.06 sec)

Now, if you would be kind enough to explain us what is in a +0???


> Claudia M. Castaneda wrote:
> > 
> > Hi:
> > Thanks for your reply but...
> > 
> > mysql> select obs_id, obs_URI, obs_source, beg_date, beg_time from
> > observation where beg_date between 19990120 and 19990530;
> > Empty set (0.21 sec)
> > 
> > and you can see that there is data within this range:
> > 
> > mysql> select obs_id, obs_URI, obs_source, beg_date, beg_time from
> > observation where beg_date between '1999-01-20' and '1999-05-30';
> > 
> 
> Try the 1st with a +0:
> mysql> select obs_id, obs_URI, obs_source, beg_date, beg_time from
> observation where beg_date+0 between 19990120 and 19990530;
>                           ^^
>   jim...
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread3909@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
> 

Thread
Dates querying MysqlClaudia M. Castaneda24 May
  • Re: Dates querying MysqlGraeme B. Davis25 May
  • Re: Dates querying MysqlChristian Mack25 May
    • Re: Dates querying MysqlClaudia M. Castaneda25 May
      • Re: Dates querying MysqlJim Faucette25 May
        • Re: Dates querying MysqlClaudia M. Castaneda25 May
          • Re: Dates querying MysqlVivek Khera25 May
        • Re: Dates querying MysqlJim Faucette25 May
          • Re: Dates querying MysqlMichael Widenius2 Jun
            • Re: Dates querying MysqlVivek Khera2 Jun
              • Re: Dates querying MysqlMichael Widenius3 Jun
Re: Dates querying MysqlVivek Khera2 Jun