Suppressing Space & Zero into date formating

TO_CHAR(sysdate, 'Month,YYYY')
Result: 'July ,2016'
TO_CHAR(sysdate, 'FMMonth,YYYY')
Result: 'July,2016'
TO_CHAR(sysdate, 'Month DD, YYYY')
Result: 'July 09, 2016'
TO_CHAR(sysdate, 'FMMonth DD, YYYY')
Result: 'July 9, 2016'
See into above examples, when we use FM into format_mask parameter it removing/suppress the space and zero. If you use MON it won’t has space, but if using Month is will be returning with right padding space.

Leave a Reply

Your email address will not be published. Required fields are marked *