enable datetime type field query in Oracle Form 6.0

If your company is still using Form 6.0 and unfortunately you have to query inside a "datetime" field.
Unlike "char" or "number" field, the "Datetime" field does not sopport ">/<" notation. that means, you can not type ">/<" inside a datetime field to execute a later than or earlier than query. However to change to format of this field, may effect the other fileds and cause unnecessary changes. 
Here is a quite easy and effective way to solve your problem.
COPY (‘>=’ || to_char(:datablock.field1, ‘yyyy-mm-dd hh24:mi:ss’),’:datablock.field2′) ;
here assume field1 is the field you type in a datetime and "field2" is the actual datebase field, which you wanna compare your input with.
in this way, the notation ">=" will be put into your sql sentence to excecute.
This entry was posted in Oracle. Bookmark the permalink.

2 条 enable datetime type field query in Oracle Form 6.0 的回复

  1. Unknown says:

    超哥还是一往如前,不但是IT学家,还是个文学家,语言很优美。偶看过后,感觉滔滔江水,连绵不绝的涌过来…
    (感谢刘为同学,教会我歌颂人的能力。)
     

  2. 小西 says:

    o(∩_∩)o…

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Connecting to %s