Hi All,
I promise I did my homework and looked around, but I can't find a
simple date/datetime converter in C or C++. I think there might be one
in YACL and things like that but it's pretty huge and I was hoping to
find just a simple snippet somewhere.
Situation is I have some files with varying date/date time formats in
them. They are coming in as strings. I am setting some parameters to
my code to tell it what format the date/datetime is in for this file.
(only one format each per file) And from the definition of the format I
want to convert each date/datetime field to it's ISO format YYYY-MM-DD
and YYYY-MM-DD HH:MM:SS.MMM.
I am guessing that such a snippet exists as this is an extremely common
activity. I am surprised I didn't find one searching.
I'm looking for C or C++. C would be nice and easy as my code is C++
but where I want to put this is inside another class where I already
have the format defintion and the date field to convert as C strings.
Any pointer would be most appreciated..
Best Regards
Peter Nolan
www.peternolan.com