i'm having some issues to make this work on a transformation in Oracle Bpel I receive a date, and a group criteria: mm/yyyy or: yyyy.
So, I have to construct an 'start day' and an 'end date' with the date I receive.
if the criteria is mm/yyyy, the start day will be the first day of the given month/year, and the end date, the last day of the given month/year.
I know there is a function called: functx:last-day-of-month
But I cannot make this work in Oracle Bpel, so that's why i'm using this answer: Last day of previous month in XSLT Just want to know how to do that with any given month.
Example: for the given date: 2012-10-20T20:18:33
I should return the dates:
Start date: 2012-10-01
End date: 2012-10-31
Thanks a lot for any help.
If your processor supports only XSLT 1.0, you can determine the last day of month of any given date by calling the following named template:
Example call:
returns:
Example call:
returns:
Added:
For completion, in XSLT 2.0 you can do: