This depends... Is the "time" stored as values in an array, struct, cell, ASCII- or Excel file?! Do you want to get the current date considering nanoseconds by CLOCK or CPUTIME? The subject seems to imply, that you are working with a serial communication. Do you want to get the exact timing between two events? Without posting any details, a useful help is really unlikely.
BTW: the software is called "Matlab".