Skip to Main Content

SQL & PL/SQL

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.

trim(to_char(to_date))) and to_char(to_date)) functionality

BS2012May 7 2013 — edited May 7 2013
Hi Everyone,
Please see the below queries. According to me both are resulting same. Then why do we use Trim over here. I found this in an existing code. The functionlity is "we have to check that particular day whether it's weekdays or weekend". This is an existing functionlity, I'm little confused here. Please help me out.
SELECT trim(to_char(to_date('15042012', 'DDMMYYYY'), 'DAY')) from dual;
SELECT to_char(to_date('15042012', 'DDMMYYYY'), 'DAY') from dual;
Regards,
BS2012.

Edited by: BS2012 on May 7, 2013 6:34 PM

Edited by: BS2012 on May 7, 2013 6:34 PM

Comments

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

Post Details

Locked on Jun 4 2013
Added on May 7 2013
11 comments
5,563 views