Yeah, this has come up a few times, so we should probably provide a better interface in the conversion functions ( http://julia.readthedocs.org/en/latest/stdlib/dates/#conversion-functions)
Currently, you can do DateTime(Dates.UTM(63524217600000)) to get what you want. -Jacob On Wed, Feb 4, 2015 at 3:05 PM, Stephan Buchert <[email protected]> wrote: > I have a lot of time-stamped data (from a sensor). The physical unit of > the time-stamps is milliseconds from some known instant of time. The > natural type for these in Julia would be DateTime. But instead of simply > constructing DateTime directly from my millisecond time-stamps, e.g. > > julia> dt=DateTime(Millisecond(timestamp)) > > it seems that I have to write code to get second, minute, hour, day, > month, year from my timestamps? Isn't there a way to directly set the > instant value (which happens to be in millisecond) of a DateTime variable? >
