CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2011
    Posts
    38

    Subtracting Time

    How can I subtract 2 minutes from the current time, and then get data at that particular time?

  2. #2
    Join Date
    Jan 2012
    Posts
    3

    Re: Subtracting Time

    To substract two minutes to the current time, you need to do this:

    DateTime twoMinutesAgo = DateTime.Now - TimeSpan.FromMinutes(2);

    I'm not sure what do you mean by "get data at that particular time". Are you working with some sort of database?

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