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

    What time is it?

    What is the best way to get the time stored into a variable? In particular, I am looking for a way to get the number of seconds past the minute stored into an integer variable. Thank you, Eric Slater



  2. #2
    Join Date
    May 1999
    Posts
    42

    Re: What time is it?

    SYSTEMTIME sysTime;
    GetLocalTime(&sysTime);
    // seconds past the minute
    word Seconds = sysTime.wSecond;


  3. #3
    Guest

    Re: What time is it?

    CTime t = CTime::GetCurrentTime();
    int Seconds = t.GetSecond();


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