Compare date to current system date

Hello everyone.

I need to do the following:

  •      Get the system date
  •      Get the date from a field on a flat file
  •      If the date field on the flat file is more than 7 days older than the system date, do something

Can someone provide tips as to how to accomplish this?



If you have PSUtilities package installed on your IS, it contains service which gives out “dateDifferenceDay”.So put a logic to branch on the dateDifferenceDay value it works as expected.Or else build a custom Javaservice using Java calendar API’s to achieve this.


Hi Kendrix,
There is no built-in service in IS which accepts 2 dates as input and gives you the out the noOfDaysDiff. So write a Java service.

Just do a google search and you will find lots of Java code snippet which does that.

First try yourself, if you find difficulty writing such code, we can send you the code.

This is very common utility we all webMethods veteran frequently need and so we have it.