0

I want to convert the seconds into weeks and days using xslt. Here is the xml which needs transformation:

<INSTANCE cast="Duration" key="false" name="Actual RPO" trend="false">
        <ITEM end="-1" start="-1">
          33287552
        </ITEM>
</INSTANCE>

The value in the tag is in seconds.I need to show the output as Number of weeks and the days.

Format for Output: Actual RPO: 55 weeks 0 days

(Formula: Days: value/(60*60*24) Weeks: value/(60*60*24*7))

Saurabh
  • 930
  • 2
  • 17
  • 39
  • have you seen this? http://stackoverflow.com/questions/15370152/seconds-to-time-in-xslt – Joum Sep 13 '13 at 11:48
  • 1
    Is this a trick question? You've already given a formula; what stops you from using it to calculate the result you want? `concat('Actual RPO: ', floor(number(.) / (60*60*24*7)), ' weeks ', round((number(.) / 60*60*24) - floor(number(.) / (60*60*24*7))), ' days')` – C. M. Sperberg-McQueen Sep 15 '13 at 23:49

0 Answers0