CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Peter_B

Search: Search took 0.04 seconds.

  1. Replies
    20
    Views
    26,954

    Re: Date Comparison

    @DataMiser: I know, it really infuriates me when people spread complicated, slow, buggy ways of doing something which can be done easily, quickly and correctly. The reason I went into so much detail...
  2. Replies
    20
    Views
    26,954

    Re: Date Comparison

    I'll just post the code here as well so people don't have to download the zip file if they just want to see it. The comparisons are highlighted in red:
    Private firstDate As Date
    Private secondDate...
  3. Replies
    20
    Views
    26,954

    Re: Date Comparison

    Karl's reputation is completely irrelevant here. Once you have a piece of code, whether it is correct or not does not depend upon the author's reputation. It depends solely upon whether, when you run...
  4. Replies
    20
    Views
    26,954

    Re: Date Comparison

    Thanks for that correction dglienna. According to this link (http://msdn.microsoft.com/en-us/library/aa243311(v=vs.60).aspx) the valid range is January 1, 1980 through December 31, 2099 (for Win95)...
  5. Replies
    20
    Views
    26,954

    Re: Date Comparison

    I found this piece of code by hensa22 in the original reply to this thread. Works great. I have not tested it because there is not need to - the documentation says it works for any date which can be...
  6. Replies
    20
    Views
    26,954

    Re: Date Comparison

    Yes, use date1 > date2. This will work for any two dates.
    Why don't you use this? :confused:
  7. Replies
    20
    Views
    26,954

    Re: Date Comparison

    That is a great way to do it when the following conditions apply:

    Efficiency isn't a concern
    Getting the correct answer isn't, either :rolleyes:

    Your method compares dates in lexical order...
Results 1 to 7 of 7





Click Here to Expand Forum to Full Width

Featured