Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

Access 2002

  • Please log in to reply




  • Member
  • PipPip
  • 65 posts
I am trying to find out how many days between two dates?? I have tried:
in query design I have tried

field: transaction date
field: date case received

expression:[transaction date] - [date case received]

what is the criteria supposed to be?

they are date formats: mm/dd/yyyy

03/15/2007 - 02/15/2007 = how many days between dates???
  • 0




    Tech Staff

  • Technician
  • 1,323 posts
Hello rivekm,

In Access, in query design, go to View | SQL View. Use the following function to get what you need:
DateDiff('d', [date case received], [transaction date])
This function will return the difference between the two dates, in the given increment (d=days). You can search Access help if you want a more thorough explanation.

So your ending SQL statement may look something like the following:
SELECT CaseId, [transaction date], [date case received], DateDiff('d', [date case received], [transaction date]) AS [Case Duration]
Note: You would not need to include [transaction date] and [date case received] in the return fields, I just included them for reference.

Let me know if this helps,

  • 0

Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP