Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date time manipulation

Status
Not open for further replies.

Robertus

Programmer
Feb 16, 2001
81
0
0
RO
Does anyone know how could I manipulate dates and times and time spans in an ATL COM AppWizard generated project (SERVICE (.exe)) ??
I tried COleDateTime but it is NOT recognized!!!

Please, help me!
 
Try using the time functions from the C Runtime library. Things like time() and difftime() can be used to calculate the timespans and localtime() will convert to a structure for ease of detecting the pieces.

Most of these functions return a time_t datatype which is the number of seconds since midnight 1/1/1970. Unless you're doing something out of the ordinary or need sub-second precision, these functions should be able to work nicely.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top