Date is stored as a numeric value in MS Access and MS Excel. Therefore, if you enter ?Cdbl(now()) in your next window ( Ctrl + G ?Cdbl(now()) , you will get the following number: 42195.5204050926 .
Integers indicate how many days have passed since 1899 on December 30, and a decimal number shows how many of the current day have passed.
So, in your code you basically say something like this:
timeTaken = 42195.5222337963 - 42195.5204050926
In this example, I just checked Now() once, and then again after a few minutes. So, I ended up with 0.0018287037 .
Now, if I show that using the Date variable, for example, in your example, I basically say what time it was at 0.0018287037 , which was December 30, 1899, 12:02:38 AM.
You can visually see this by returning to the nearest window and typing ?cdate(0.0018287037) , and you will get the result: 12:02:38 AM . To take this one step further, you can enter ?cdate(1.0018287037) and you will get the result: 1899-12-31 12:02:38 AM
So, in your situation, you can simply change:
MsgBox timeTaken
To:
MsgBox Format(timeTaken, "nn:ss")
Note: I did not notice that the screenshot says "Excel", although this answer will still be valid.