BI Publisher (MOSC)

MOSC Banner

xdoxslt:sysdate(‘IW’) displays 1 digit for first 9 weeks whereas I need to show 2 digits

edited Apr 29, 2014 11:58AM in BI Publisher (MOSC) 4 commentsAnswered

In a label template, I am using below formula:

<?xdoxslt:set_variable($_XDOCTX, ’v1’,concat('H',substring(CUSTPART,1,2),VN,xdoxslt:sysdate(‘IW’),xdoxslt:sysdate(‘YY’),xdoxslt:sysdate('MISS')))?><?xdoxslt:set_variable($_XDOCTX,’v2’,concat(CUSTPART,’-',VN,’|’,LPN,’-‘,DC,’|’,QTY,’|’,xdoxslt:get_variable($_XDOCTX,’v1’)))?>

In the above formula, "xdoxslt:sysdate(‘IW’)" is supposed to show the week number of the year. If the week is any of first 9 weeks of the year, it should show like 01 or 02 or 03 or 04 and so on until 09. After this it should continue to show 10, 11 and so on. But this function shows first 9 weeks in single digit only. How to modify the above formula so that it shows double digit for even first 9 weeks of the year.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center