Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-17-2018, 05:28 AM   #1
Erika
Newly Registered User
 
Join Date: Nov 2017
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Erika is on a distinguished road
Question Date Fields Help

Hi,
I currently have a query which shows me a reference, request type, date received, closed date and allocated date. I already have it set to only show open records but I need it to show me if the allocated date has been blank for more than a set number of days from the date received. Is this something which is possible. I am quite new to access so any help would be very much appreciated.

Erika is offline   Reply With Quote
Old 04-17-2018, 05:34 AM   #2
plog
AWF VIP
 
Join Date: May 2011
Posts: 8,551
Thanks: 10
Thanked 2,050 Times in 2,008 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: Date Fields Help

You would use the DateDiff function:

https://www.techonthenet.com/access/...e/datediff.php
plog is online now   Reply With Quote
Old 04-17-2018, 05:40 AM   #3
Erika
Newly Registered User
 
Join Date: Nov 2017
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Erika is on a distinguished road
Re: Date Fields Help

I would have tried that but one of the date fields will be empty and I need a report to show when this has been empty for more than a set number of days. I can get the query to show me all the records where this date field is empty but apparently we need to know how long it has been empty for.

Erika is offline   Reply With Quote
Old 04-17-2018, 05:50 AM   #4
plog
AWF VIP
 
Join Date: May 2011
Posts: 8,551
Thanks: 10
Thanked 2,050 Times in 2,008 Posts
plog is a jewel in the rough plog is a jewel in the rough plog is a jewel in the rough
Re: Date Fields Help

Most likely you want to use the Date() function in your DateDiff.

Date() returns todays date. So, if DateReceived is April 13, 2018 and you use it and Date() in your DateDiff it will return 4 days.

DaysReceived: DateDiff("d", [AllocatedDate], Date())

plog is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation of date field based on another table date fields. xhal99104 Theory and practice of database design 3 09-29-2014 05:06 AM
[SOLVED] Date Field to AutoPopulate other date fields to futrue date demicay2669 Modules & VBA 4 10-29-2013 09:32 AM
Query criteria Date() not accurate for fields set as General Date (date/time) isaacski Queries 3 05-24-2013 06:51 PM
average fields based on selected date fields OXFCompGuy General 7 10-09-2011 02:04 PM
Auto Populating Date Fields Based on a specific date. BobInTexas Modules & VBA 2 09-07-2010 08:48 AM




All times are GMT -8. The time now is 05:49 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World