Skip to main content
GameDev.net gamedev.net
🔒 Locked

converting CString to CTime

Started by IADaveMark Jan 15, 2003 at 10:33 PM 1 replies 5.7k views
Original Post
IADaveMark
IADaveMark
I have been using atoi(), atof(), etc. to convert CString data into integers, floats, etc. How would I go about converting a CString into a CTime value? For example, I need to convert "13:00" into the CTime version. Any thoughts? Everything I search for comes up with ways of converting CTime TO CStrings! Dave Mark - President and Lead Designer Intrinsic Algorithm - "Reducing the world to mathematical equations!" RIPPL Sports - NFL Statistical Analysis and Prediction System
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit<
IADaveMark
IADaveMark
Well, it doesn''t matter whether I WANT to or not, I have to. This whole process stems from loading in data from a .csv file. The class I am using to do this pulls in a .csv row as a CStringArray. I just step through the array and dump the info into the class members of the class that the data pertains to. This has been working weel for all the other stuff... until I got to the date/time information.

Now, I just realized that I really should be using COLEDateTime instead for other reasons... so I would like to expand my request to include that.

Dave Mark - President and Lead Designer
Intrinsic Algorithm -
"Reducing the world to mathematical equations!"
RIPPL Sports - NFL Statistical Analysis and Prediction System
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit<

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.