473,735 Members | 11,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DateDiff() and AVG function questions

I'm trying to set up a query that will include a new field ('Days
until completion') whose value is derived from the DateDiff function.
I think I have the syntax correct but am not sure.

Days until completion: DateDiff("d",[TODAY],[DeadlineDate])

is TODAY the appropriate syntax for today's date? Could the
function/expression even be set up that way, or do I need to do
something else to get 'days until completion'? (My Access manuals do
not mention a TODAY function and Access help doesn't have anything
about DateDiff anyway.)

Another question: with the AVG function, is it possible to first
remove outlying numbers (the lowest and/or highest numbers in the
range)? Is there some way to remove outliers or does this have to be
done manually?

My understanding is that there will be a database to track project
development by phases (which would be a series of date ranges in a
query, I guess); then I'll be getting an average of test scores for
each phase.
Nov 12 '05 #1
1 8005
Today is not an Access function.
Use Date() if there is no time of day element needed.
If you need the time of day also, then use Now().

Days until completion: DateDiff("d",[DeadlineDate],Date())

Don't use Access help for references to a function.
Use VBA help instead.
Open any code window and click on Help there.
Try it by typing DateDiff in Access Help, then open any code window and
type DateDiff there. It show up in the VBA Help.

For information about Avg() look up DAvg() in VBA Help.

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
"intl04" <in****@hotmail .com> wrote in message
news:b7******** *************** ***@posting.goo gle.com...
I'm trying to set up a query that will include a new field ('Days
until completion') whose value is derived from the DateDiff function.
I think I have the syntax correct but am not sure.

Days until completion: DateDiff("d",[TODAY],[DeadlineDate])

is TODAY the appropriate syntax for today's date? Could the
function/expression even be set up that way, or do I need to do
something else to get 'days until completion'? (My Access manuals do
not mention a TODAY function and Access help doesn't have anything
about DateDiff anyway.)

Another question: with the AVG function, is it possible to first
remove outlying numbers (the lowest and/or highest numbers in the
range)? Is there some way to remove outliers or does this have to be
done manually?

My understanding is that there will be a database to track project
development by phases (which would be a series of date ranges in a
query, I guess); then I'll be getting an average of test scores for
each phase.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7154
by: News Central | last post by:
To all! I use the DateDiff function using VB6 and get this error 'Wrong number of argument or invalid property assignment' ... have anyone seen this problem? thanks ....
7
1911
by: Drago | last post by:
Hi, I got the next question, I want to know the diference between two dates and thats is really easy, but my problem is get that diference in the following format ex. "the diference is= 0 year, 9 months, 11 days" var1 = 04/04/1999 var2 = 01/11/2000 Response.Write("var1 to var2 is " & DateDiff("d", var1, var2) & " days
6
16515
by: Lofty | last post by:
Hi all. I have to write an app that interacts with mySQL (I really must have done some evil, evil stuff in a previous life to be landed with this!) I need to work out the difference in days between values in the database and the current date. "No problem," thought I , "I'll just use the SQL DATEDIFF command." Heh! Well, the user interface I'm using didn't even recognise DATEDIFF as being a function, so I decided to visit the mySQL...
4
11916
by: Paolo | last post by:
I am having some problem with a Year Function. I have form on which I have 4 field which indicate dates and an additional form which sums those dates: These are the fields: YEARS STARTINGDATE1 ENDINGDATE1 STARTINGDATE2
1
4984
by: PMBragg | last post by:
ORINGINAL Post >Thank you in advance. I'm trying to pull all inventory items from December >of the previous year back to 4 years for my accountant. I know this can be >done, but I'm drawing a blank. I've tried; > >DateDiff("y",-4,DateIn) and get errors > >Please any assistance would be greatly appreciated. >
5
6689
by: mcbill20 | last post by:
Hello all. I have a really basic question that I hope someone has a better answer for. I apologize in advance-- I know this is probably a really basic question but I am used to Oracle rathern than Access. I have a database where they customer wants to purge records from certain tables after three years. When I was asked to make the changes I originally thought this was an incredibly simple thing to do. I looked at the function list and...
7
15500
by: Adrian | last post by:
I hit on this problem converting a VB.NET insurance application to C#. Age next birthday calculated from date of birth is often needed in insurance premium calculations. Originally done using DateDiff in VB.NET which is only available in C# if you don't mind linking in Microsoft.VisualBasic.dll to your C# application. I wanted to avoid this so set about a pure C# solution which uses a combination of TimeSpan in whole days and the...
6
7648
by: kevinjwilson | last post by:
I am trying to get the date difference between two dates but I don't want the function to include weekends in the calculation. Does anyone have an idea on how to make this work?
2
2777
by: muddasirmunir | last post by:
i am using vb 6 , i had place two datepicker in form now i want to calcuate differcen of month in two date for this i used the function datediff i had try it withh many syntax but getting error like datediff(mm,date1,date2) datediff(mmm,date1,date2) datediff(month,date1,date2) datediff("mm",date1,date2) datediff("mmm",date1,date2) datediff("month",date1,date2)
0
8785
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9463
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9327
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6747
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6049
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4822
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3273
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2739
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.