Hi folks,
I have a db that I need to draw some stats from. The db itself is from the
web application moodle which, perhaps to be cross-platform, uses unix epoch
times stored as integers throughout (see table description at end of mail).
I'd like to query some stats based on the appearance of obje
On Thu, 17 Sep 2009, Frank Bax wrote:
> Gavin McCullagh wrote:
>> SELECT time, to_timestamp(time) AS ts,
>> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
>> ERROR: syntax error at or near ","
>> LINE 1: ...t time, to_timestamp(time) AS ts,
On Thu, 17 Sep 2009, Gavin McCullagh wrote:
> On Thu, 17 Sep 2009, Frank Bax wrote:
>
> > Gavin McCullagh wrote:
> >> SELECT time, to_timestamp(time) AS ts,
> >> EXTRACT('months',to_timestamp(time)) FROM mdl_log;
> >> ERROR: syntax error at or n
On Thu, 17 Sep 2009, Osvaldo Kussama wrote:
> From manual:
> http://www.postgresql.org/docs/current/interactive/functions-datetime.html
>
> date_part('month',to_timestamp(time))
> or
> extract(month from to_timestamp(time))
Gah. I don't know I missed that. This works fine.
SELECT extract(mo
Hi folks,
I have a db that I need to draw some stats from. The db itself is from the
web application moodle which, perhaps to be cross-platform, uses unix epoch
times stored as integers throughout (see table description at end of mail).
I'd like to query some stats based on the appearance of obje