Dateweek problem

I am using a service in my flow and the pattern I set is “w”, as it will give me the number of week of the year according to year, month and day.
But, when I tested it with date for end of december, it gives me week “0” but It should return 52.
I dont think that setting the time zone and locale will rectify the problem. Any idea why its returning zero.


Hi nasir,

It should return you 1 and not 52. The way Calendar functions is the week with 1st January is week one.
So upto 4th January 2003, it returns week One. Using that logic 27 Dec 2003 is the last day of week 52. Date after that fall in week 1 of next year.

I hope I am clear.


Your assumption is correct for calender functions, but webmethods date built in services return zero instead of 1.


I use IS 4.6 SP2. I tried with 31-Dec-2003 and return value is 1.

I am using IS 6.0.1 SP2, but its returning 0 for the last week in december. So, I explicitly added ‘1’ in my logic to have the correct number of week.

I think it a way that sevice perform a calculation on week. Looking at the problem and will update if I find any. If you guys find some solution, do let me know.


I have to work on Wm MainFrame Adapter. I want to know some basics required for working with this in Wm integration platform.


Are you done with reading Mainframe Adapter userguides located in
WmMainFrameAdapter/Doc/Folder section.

And there are many threads posted under wMUsers Discussion Forums » Integration Server & Trading Networks » Mainframe Integration Server