• Thanks I managed to get it all working successfully.

    Also I modified the functions so I could provide 2 dates so I can calculate the time passed between them instead of using getdate().

    Nice work.

    MCITP SQL 2005, MCSA SQL 2012