CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    Argentina....
    Posts
    118

    COleDateTime <---> DATE

    Hi,
    anyone knows how to convert from a COleDateTime to a DATE one, and vice versa....

    Thanks,
    me
    My history: QB->VB->TC++->VB->VC++->VC#

  2. #2
    Join Date
    May 1999
    Posts
    18
    You should be able to use operator DATE to cast a COleDateTime to a DATE, and use operator = to set a COleDateTime to a DATE.

    COleDateTime cdt1, cdt2;
    DATE dt;

    cdt1 = COleDateTime::GetCurrentTime();
    dt = (DATE) cdt1;
    cdt2 = dt;

  3. #3
    Join Date
    Sep 2003
    Location
    Argentina....
    Posts
    118
    Thanks, it's not difficult....
    My history: QB->VB->TC++->VB->VC++->VC#

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured