Consulting

Results 1 to 2 of 2

Thread: display above spicific day in SQL using access and vba

  1. #1

    display above spicific day in SQL using access and vba

     
    Set rs = db.OpenRecordset("SELECT * FROM COMPUTER_LIST")
    If rs.RecordCount = 0 Then
       Else
       With rs
            DateDiffValue = DateDiff("d", CDate(!created_date), Date)
             If DateDiffValue > 10 Then
                 'Display Here
             End If
        End With
    End If
    instead of doing this, how can I make this in SQL?

    Set rs = db.OpenRecordset("SELECT * FROM COMPUTER_LIST WHERE create_date > dateadd(day,10,date)")

  2. #2
    VBAX Regular
    Joined
    Jan 2018
    Posts
    55
    Location
    SELECT * FROM COMPUTER_LIST WHERE datediff('d',now,create_date) > 10

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
  •