>Where I can find a function to calculate the time
>between 2 dates ???
If they're datetimes, just subtract them, and you get a result in seconds; there are 60 seconds in a minute, 60 minutes in an hour, and 24 hours in a day, even if some employers believe there should be more...