Joined: 31 Oct 2006 Posts: 968 Location: Richmond, Virginia
Just give it to you? How will you learn anything that way?
Can you do this in a regular language? If so, then you know the algorithm.
Can you look for DB2 functions that might extract the parts of a date, and then maybe use subtractions, and then see what happens, and then adjust your code till it works. That's how whoever gives you the code did it.