Skip to main content
4 of 4
added 198 characters in body
rcollyer
  • 34.3k
  • 7
  • 95
  • 198

Using DateList first and then using DateObject seems to work:

DateObject[ DateList[{"2014/01/09 07:24:36:985", {"Year", "/", "Month", "/", "Day", " ", "Hour24", ":", "Minute", ":", "Second", ":", "Millisecond"}}]] 

The fractional seconds are in the DateObject, but are not displayed.

Consider:

date1 = DateObject[DateList[{"2014/01/09 07:24:36:555", {"Year", "/", "Month", "/","Day", " ", "Hour24", ":", "Minute", ":", "Second", ":","Millisecond"}}]] date2 = DateObject[DateList[{"2014/01/09 07:24:36:100", {"Year", "/", "Month", "/","Day", " ", "Hour24", ":", "Minute", ":", "Second", ":", "Millisecond"}}]] FullForm[date1] FullForm[date1 - date2] 

This is directly visible by looking at the InputForm, e.g.

InputForm@date1 (* DateObject[{2014, 1, 9}, TimeObject[{7, 24, 36.555}, TimeZone -> -6.], TimeZone -> -6.] *) 
Rudy
  • 125
  • 7