Subject Re: i want to this ; select avg(datefield) from ... but what?
Author Orhan TURHAN
--- In firebird-support@yahoogroups.com, "Anderson Farias"
<peixedragao@...> wrote:
>
> Hi,
>
> > But it should, don't you agree?
>
> IMHO, the fact that dates are internaly represented by a number does
> not make them a number. Detes are discrete (distinct) elements, I can't
> see how could one take a average from that.
>
> Lets say you have this set:
> [A, B, A, A, C, B] ... then, what's the avg ??
>
> That's the same with dates, what whould be the avg. for
> [mar-08-01, jan-08-31, may-07-29] ??
>
>
> Regards,
> Anderson Farias
>



DateField is not only string data type.

you sad
> That's the same with dates, what whould be the avg. for
> [mar-08-01, jan-08-31, may-07-29] ??

[mar-08-01, jan-08-31, may-07-29] = [32223, 32263, 32069] (for example)

avg([32223, 32263, 32069]) = 32185 = oct-08-16 (for example)