See the UDF Forum, it contains numerous date-time-math UDFs.
_________________________
There are two types of vessels, submarines and targets.