Have you looked into the DB2 manual to see if there is a function to do it? If there isn't then you will have to do it in a program. You really should use SQL for what it was designed for - storing and retrieving data not doing your program's work.
The problem I have is that people can explain things quickly but I can only comprehend slowly. Regards Nic
the day number as input is not enough, You need also the year
the day number for march first of a NON leap Year will the same as the day number of february 29th of a leap year
cheers enrico When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser, so that I am sure that the information requested can be reached with a very small effort
If the SQL is embedded in another language, would it not be easier to invoke the LE CEEDAYS and CEEDATE functions?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day