It depends on exactly what you're trying to do - is correct that you wantDtime = Etime - Stime. You had Etime and Stime reversed. However, now youmight like to know what to do with it. It depends on what you want to do -if you just want to know the elapsed seconds, and you know it's less thanone minute, you might just use second(Dtime). If there is a possibility ofminutes, you might use minute(Dtime) * 60 + second(Dtime). It's a littlecomplicated by the fact that the result is a serial time, which is afractional amount of a day that has elapsed since midnight.

I think your questions have got to be in the form of questions - maybe alittle more info than just "it's not working" would be helpful.

If you subtract the earlier time from the later time, you get the elapsedtime, in a fractional portion of a day. So, for example, instead of 30seconds, you get 3.47222222222222E-04, which is the portion of a day that 30seconds is. If you understand that, the next question is what are you tryingto do with the result?

Now, another option would be to use the "Timer" function.this function returns the number of seconds since midnight.It isn't quite as useful if you're starting a job at 11:55pm andending after midnight, but you probably work day shift anyway.