Convert CString to CTime / COleDateTime
-
Hi guys, I have a string, for example '1085462900'. I have to convert this string into a CTime / COleDateTime value. How can i do this? I get this string from a oracle database. P. :cool:
What does that number represent?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
This number represents Date and Time. The field on the database is from type int which contains this number.
P-Rex wrote: This number represents Date and Time. I figured that much out. Is it the number of seconds since a particular date? Is it the BCD form of a date? Be specific.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
What does that number represent?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
Hi guys, I have a string, for example '1085462900'. I have to convert this string into a CTime / COleDateTime value. How can i do this? I get this string from a oracle database. P. :cool:
-
What does that number represent?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
Just for the common knowlege. This number is called UTC time and represents the number of seconds ellapsed since 1.1.1970, it is 0+ GMT time zone without day light saving addition DavidR
DavidR_r wrote: This number is called UTC time and represents the number of seconds ellapsed since 1.1.1970... Ok, both
CTime
andColeDateTime
have constructors for handling such a value.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
try CTime ct = CTime((time_t)(_atoi((const char*)cs))); and see if it matches the Oracle value