Quote from robbrit:
I've been using either the built-in TIME and DATE types within MySQL or a UNIX epoch (just an integer) for years and it's never steered me wrong, but since I've never needed to store millisecond data which isn't supported I wouldn't be able to tell you how well it works there. However I can tell you that databases are slow - using them for something which requires speed on the order of milliseconds might not be the best idea!
Quote from 377OHMS:
The reason you sometimes encounter seconds and nanoseconds stored separately in HDF5 is that many technical applications utilize time in "seconds since midnight January 1st".
If nanosecond information is to be preserved when using such a datum the concatenation of seconds and nanoseconds is too big to fit into a double-double (Matlab) or a long-double (Windows) without truncation so they are stored in separate "sec" and "nsec" attributes of the time parameter.
If you encounter this schema and really want to preserve the nanosecond information you can simply convert the seconds field to Julian day and then concatenate the seconds remainder and the nanoseconds field. Now you have "seconds since midnight" for the trading day.