473,395 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 7986
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.google.c om...
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
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
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,...
6
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...
4
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...
1
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...
5
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...
7
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...
6
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
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.