• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 956
  • Last Modified:

How To change time type "time_t" to COleDateTime??

how to change type "time_t" to COleDateTime easyly??
0
Thomasa
Asked:
Thomasa
1 Solution
 
ThomasaAuthor Commented:
I'm a newbie ,need help!!
0
 
ZoppoCommented:
THIS SEEMS TO BE A DUPLICATE QUESTION, YOU SHOULD DELETE IT ...

ZOPPO
0
 
GlennDeanCommented:
Thomasa:
   You can let the COleDateTime constructor do the work for you.  Here's an example:
   time_t curTime;
   "Set curTime"
   COleDateTime oleCurTime(curTime);
 
   COleDateTime has 9 constructors, one taking a time_t to construct it.

   IF you don't want to create a new COleDateTime object like I've done above, then you can do the following:
   time_t curTime;
   COleDateTime oleCurTime;
   "Do alot of processing"
   oleCurTime = curTime;

   The compiler does all the hard work for you.
   Glenn
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now