Re: [SQL] Date/Time Conversion

2005-04-10 Thread Yasir Malik
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

Re: [SQL] Date/Time Conversion

2005-04-03 Thread Greg Stark
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

Re: [SQL] Date/Time Conversion

2005-04-03 Thread Yasir Malik
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?

Re: [SQL] Date/Time Conversion

2005-04-02 Thread Tom Lane
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