[xsd-users] How can I parse time in milliseconds using xml_schema::time(hour, minute, second)

Boris Kolpackov boris at codesynthesis.com
Wed Jun 28 08:39:42 EDT 2017


Harpinder Kaur <mailme.harpinder at gmail.com> writes:

> I need to display time as "21:32:52.126" but I am unable to do so. I have
> read the code synthesis documentation and related stuff, there I cam to
> know that built-in time type has a constructor like time(int hour , int
> minutes , *double seconds*). I tried passing fractional time(combined
> seconds and milliseconds from an input boost::ptime object) to the
> constructor to write finally as an XML tag's value. However, XML tag is
> having only 21:32:52 as time value, milliseconds are getting truncated.

You must be initializing xml_schema::time incorrectly (and since you don't
show how you do it, that's all I can say).

Boris



More information about the xsd-users mailing list