Question:
MS Access: Datediff function return value?
2008-08-29 08:39:07 UTC
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??
Three answers:
kryzchek79
2008-08-29 09:04:44 UTC
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())
?
2016-11-04 08:57:49 UTC
Access Datediff Function
?
2016-12-04 05:44:02 UTC
In question layout, click the Totals button on the toolbar. this could open the completed row interior the Fields grid. Then replace the Values column to be Sum. flow away the Names column as team


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...