i want to use the date from a date field that also has the time stamp and calculate it within an access query. - WHERE Day(DateSerial(<d>, <m>, <y>))=<d>
would it be possible to only include the date serial dd/mm/yy of the startfield, and leave the time stamp out using the function above in the function below. - Somefield: Workingdays([Startfield],[Completefield])
would there be any other way to get the desired output?
8 6785 NeoPa 32,556
Expert Mod 16PB
Use the DateValue() function Trixx.
so would i apply the date value function directly to the "Date submitted" field? within the expression? -
DIH: Workingdays2([datevalue(Date submitted)],[Date Completed])
NeoPa 32,556
Expert Mod 16PB
Pretty well, yes. But the brackets ([]) go around the field name only : - DIH: Workingdays2(DateValue([Date Submitted]),[Date Completed])
with out you guys, there are alot of people(including me) who would not get their work done and would lose their jobs.
for a site with this much knowledge and the people who have the most knowledge are so willing to help, to not be add supported is amazing.
its like creating art for the purpose of creating art.
bravo friends.
i send people in my company here all the time.
i have to introduce a new field now, but i need it to calculate based on a condition being true. the new field is Sumofdays.
the calculation should not calculate if sumofdays
here is my logic. but i know this syntax is way off. -
if isnull(sumofdays)=true then
-
DIH =Workingdays2(DateValue([Date Submitted]),[Date Completed])
-
else
-
Workingdays2(DateValue([Date Submitted]),[Date Completed])- ([Sumofdays})
-
end if
-
when i try to use an iif statement, even a simple one i get a
here is what im using in the query design view -
NDIH: IIf(IsNull([sumofdays]),Workingdays2(DateValue([Date Submitted]),[Date Completed]),Workingdays2(DateValue([Date Submitted]),[Date Completed])-[(sumofdays])
-
but i keep getting the paramater input request. what might i be doing wrong?
Thanks!
NeoPa 32,556
Expert Mod 16PB
I suspect you want something like : - DIH = Workingdays2(DateValue([Date Submitted]),[Date Completed]) - Nz([SumOfDays], 0)
@NeoPa
like a charm. i had never seen the nz thing before,
thanks for the awesome help.
NeoPa 32,556
Expert Mod 16PB
You're welcome of course :)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: B Briant |
last post by:
I need to write an access query that will pull records from a table if
the start or end dates input by the user are within the start and end
dates in the db. I can't use BETWEEN because either of...
|
by: PMBragg |
last post by:
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;
...
|
by: diablo |
last post by:
hi
my access database may be placed on OS with different date settings - i.e.
the date may be m/d/y or d/m/y
how can i use this databse in a consisten way?
I want to be able to sort on the...
|
by: Glencannon4424 via AccessMonster.com |
last post by:
Hello,
I have what I believe amounts to a Date Serial issue. I have the following
columns in my table:
Hire-Date
Hire-Year
WTD-RATE
Wks-in-Yr
|
by: Graham Feeley |
last post by:
I have a date field named rcdate
it is a general date eg:
12/08/2006 3:30:00 PM
12/08/2006 3:00:00 PM
I used to update another empty field named rdate with the
with using in a update query "...
|
by: ice |
last post by:
Hello,
I have a couple of tables. The client tables and the contacted
tables.
I am not sure how to start on this, what I need is a way to query all
my clients
then show any client that the...
|
by: DontellTrevell via AccessMonster.com |
last post by:
HELP!!....I need to calculate the numer of days elapsed between two field.
But, the date format is YYYYMMDD. How can i accomplsh this?
--
Dontell Trevell
Message posted via AccessMonster.com...
|
by: N2Deep |
last post by:
I have a table named SUPPORT DATA, I have a field named Serial Number. In the Serial Number field I have many duplicates, and I only want one of each.
Sample serials ABB045000MG, JBX05050016
...
|
by: peeaurjee |
last post by:
Hello,
I have a query containing Serial, Name, Residence Visa Expiry Date in MS Access 2003. I need to put Residence Visa Registration Date in other field and that would be in reverse I mean 3...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
|
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...
|
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: 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,...
| |