IDateTime requires an object of the POSIXct class to work correctly (it looks like it works correctly with the factor transform, and is not sure why). I agree that it is not documented very well and it might be worth opening FR / PR on GH regarding documentation - there is an open queue regarding IDateTime vignette though. And FR already exists, which allows you to work with the character class.
IDateTime(as.POSIXct("2000-01-01 12:00:00.123456")) # idate itime # 1: 2000-01-01 12:00:00 ## IDateTime(factor("2000-01-01 12:00:00.123456")) ## will also work
Pay attention to the tz parameter in as.POSIXct if you want to avoid unexpected behavior
Regardless of the fact that the error is actually caused by the ITime print ITime , which calls format.ITime , see here and here for example, if you run res <- IDateTime("2015-09-29 08:22:00") , this will not result in an error, although res will be NA due to incorrect conversion (I believe) to here (format is only "%H:%M:%OS" ). It seems like a mistake to me, and I still don't know why the factor class works correctly if there is no factor method in methods(as.ITime) . Perhaps due to its integer storage mode, which calls another related method.
source share