CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Threaded View

  1. #5
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,241

    Re: How to put Date into VARIANT data type?

    Beside the solutions already posted here, the most handy way to deal with VARIANT structures in MFC is to use COleVariant.
    Just:
    Code:
       COleDateTime mytime(1996, 1, 1, 0, 0, 0);
       function(COleVariant(mytime));
       // COleVariant has a constructor which takes const COleDateTime& and an operator LPVARIANT().
    A little bit easier, isn't it?
    Last edited by ovidiucucu; September 12th, 2010 at 07:19 AM.
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Tags for this Thread

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