Date conversion

Results 1 to 3 of 3

Thread: Date conversion

  1. #1
    Yello Guest

    Default Date conversion

    I want to compare two dates (one actual, and one date that is stored) into MsSql7 database and then select the entries from the database.<BR>I have used this Sql statement<BR>strSQL="Select * From table where MyDate &#062; " &CDbl(CDate(MyNowDate))& " OR MyDate =" &CDbl(CDate(MyNowDate))& " order by MyDate DESC;"<BR>This works, but it doesnt consider entries from today or from tommorrow (meaning the stored Date)<BR>Could someone help me on this ?<BR>Yello

  2. #2
    richy Guest

    Default RE: Date conversion

    just try this:<BR><BR>strSQL="Select * From table where MyDate &#062;= " &CDbl(CDate(MyNowDate))& " order by MyDate DESC;"<BR><BR>that should work.

  3. #3
    Yello Guest

    Default RE: Date conversion

    I have found the way.<BR><BR>strSQL="Select * From table where datediff([d],getdate(),MyDate)&#062;=" & 0 & " order by MyDate DESC;"<BR><BR>Thanx anyway.<BR>Yello

Posting Permissions

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