beta_jgw=# update scenario1.time_test set local_hour = extract(hour from
to_timestamp(to_char(gmt_date,'-MM-DD')||'
'||to_char(gmt_hour,'99')||':00:00-00','-MM-DD HH24:MI:SS') at time zone
'EST');
Wild guess, but shouldn't that be :00:00:00?
Regards,
Yasir
James G Wilkinson <[EMAIL PROTECTED]> writes:
> I hope that this is some silly beginner's mistake. I have spent quite a bit
> of
> time
> reading the PostgreSQL documentation and cannot find my error. I have also
> scanned the PostgreSQL archive and the web for help, but I have not found
> anyt
beta_jgw=# update scenario1.time_test set local_hour = extract(hour from
to_timestamp(to_char(gmt_date,'-MM-DD')||'
'||to_char(gmt_hour,'99')||':00:00-00','-MM-DD HH24:MI:SS') at time
zone 'EST');
This sounds like a stupid answer, but shouldn't that be :00:00:00?
James G Wilkinson <[EMAIL PROTECTED]> writes:
> beta_jgw=# update scenario1.time_test set local_day = extract(day from
> to_timestamp(to_char(gmt_date,'-MM-DD')||'
> '||to_char(gmt_hour,'99')||':00:00-00','-MM-DD HH24:MI:SS') at time
> zone 'EST');
That seems like a mighty ugly way to d