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

Re: Fw: Count rows group by time intervals

From: "Loredana Curugiu" <loredana(dot)curugiu(at)gmail(dot)com>
To: "Oliveiros Cristina" <oliveiros(dot)cristina(at)gmail(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Fw: Count rows group by time intervals
Date: 2007-05-09 15:01:03
Message-ID: 1c23c8e70705090801u715e5369i34b9bf49d0d23184@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
> Funny thing.
> In mine, it works...
> On mine, If I subtract one date  from the other I get the number of days
> in between...which is another integer, I guess. and '%'  is the modular
> operator. Doesnt it work like this on yours?



If I substract one date from the other I get an interval.

Which version are you using?


I am using 7.4.12 version of postgres.

try
>
> SELECT (date - '2007-01-01') % 2
> FROM table
>
> to see if you get zeroes and ones .


It's not working. I've got the same error.

In response to

Responses

pgsql-novice by date

Next:From: Loredana CurugiuDate: 2007-05-09 15:10:08
Subject: Re: Fw: Count rows group by time intervals
Previous:From: Oliveiros CristinaDate: 2007-05-09 14:50:50
Subject: Re: Fw: Count rows group by time intervals

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