Skip to Main Content

Japanese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

GMT基準への変換

user10381937Mar 9 2011 — edited Mar 9 2011
where句の条件文で、ある日付型のデータをGMTに変換して比較したいと思っております。
以下、PL/SQL文の抜粋ですが、select文のto_dateの部分をGMTに変換することはできないでしょうか?
下記でおこなっていることは、日付型の値が格納されるw_dateをYYYYMMDDHH24MISS形式でいったん文字列に変換し、
SQLの条件文でto_date関数を使用して日付型で比較をしております。
w_col_createdは、date型のカラム名が入る変数です。
値としては、GMTの値が格納されます。

w_date_tochar := to_char(w_date,'YYYYMMDDHH24MISS');
w_sql_soid := 'select soid from '||w_tbl_name||' where '||w_col_created||' <= to_date('''||w_date_tochar||''',''YYYYMMDDHH24MISS'')';

以上、宜しくお願い致します。

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 6 2011
Added on Mar 9 2011
3 comments
1,759 views