Question:

MS Access: Datediff function return value?

by  |  earlier

0 LIKES UnLike

2 date fields: customer request delivery date and current date ( using date() ). i'm using the datediff function to get the date difference... In the query, i want to range the records by using between 1 and [the amount of days the user prefer to check (eg like a week as input 7)] ..also i would like the result going from the lowest to the highest (in order to show the urgency).. i tried it in so many ways to do this and having no luck at all... does anyone know how to solve my problem??

 Tags:

   Report

1 ANSWERS


  1. To sort them, just use ORDER BY in conjunction with the DateDiff function:

    SELECT

           DATEDIFF(d, DeliveryDate, Date()) AS DateDifference

    ORDER BY

           DATEDIFF(d, DeliveryDate, Date())  

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.