Skip to Main Content

Java Development Tools

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!

how to use substring and Lpad methods in groovy

Muhammad.RizwanMay 27 2014 — edited May 27 2014

Hi,

I am using jdev 11.1.2.4.

I've a db column trans_time with datatype as number to display time element of a transaction.

I've written below sql in oracle to format the time in HH:MI format.

select substr(lpad(trans_time,4,0),1,2)||':'||substr(lpad(trans_time,4,0),3,4) from trans;

How can I display this in a transient variable using groovy?

thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2014
Added on May 27 2014
2 comments
534 views