473,395 Members | 2,010 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.

date serial in access query

i want to use the date from a date field that also has the time stamp and calculate it within an access query.
Expand|Select|Wrap|Line Numbers
  1. 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.
Expand|Select|Wrap|Line Numbers
  1. Somefield: Workingdays([Startfield],[Completefield]) 
would there be any other way to get the desired output?
Feb 18 '09 #1
8 6785
NeoPa
32,556 Expert Mod 16PB
Use the DateValue() function Trixx.
Feb 18 '09 #2
so would i apply the date value function directly to the "Date submitted" field? within the expression?
Expand|Select|Wrap|Line Numbers
  1. DIH: Workingdays2([datevalue(Date submitted)],[Date Completed])
Feb 18 '09 #3
NeoPa
32,556 Expert Mod 16PB
Pretty well, yes. But the brackets ([]) go around the field name only :
Expand|Select|Wrap|Line Numbers
  1. DIH: Workingdays2(DateValue([Date Submitted]),[Date Completed])
Feb 18 '09 #4
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.
Feb 18 '09 #5
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.
Expand|Select|Wrap|Line Numbers
  1. if isnull(sumofdays)=true then
  2. DIH =Workingdays2(DateValue([Date Submitted]),[Date Completed])  
  3. else
  4. Workingdays2(DateValue([Date Submitted]),[Date Completed])- ([Sumofdays})
  5. end if
  6.  
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


Expand|Select|Wrap|Line Numbers
  1. NDIH: IIf(IsNull([sumofdays]),Workingdays2(DateValue([Date Submitted]),[Date Completed]),Workingdays2(DateValue([Date Submitted]),[Date Completed])-[(sumofdays])
  2.  
but i keep getting the paramater input request. what might i be doing wrong?


Thanks!
Feb 19 '09 #6
NeoPa
32,556 Expert Mod 16PB
I suspect you want something like :
Expand|Select|Wrap|Line Numbers
  1. DIH = Workingdays2(DateValue([Date Submitted]),[Date Completed]) - Nz([SumOfDays], 0)
Feb 19 '09 #7
@NeoPa
like a charm. i had never seen the nz thing before,
thanks for the awesome help.
Feb 19 '09 #8
NeoPa
32,556 Expert Mod 16PB
You're welcome of course :)
Feb 19 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
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...
15
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; ...
5
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...
3
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
1
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 "...
9
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...
10
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...
4
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 ...
4
peeaurjee
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...
0
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
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
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
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
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...
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...
0
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,...

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.