Greetings ... I have a table named Harms and Steven with a field named
inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any
inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing
wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#)) 3 2589 ra*********@hot mail.com wrote: Greetings ... I have a table named Harms and Steven with a field
named inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#))
Huh? DateSerial is for converting something to a date... no idea what
you're doing with it.
How about something like:
WHERE Year(Inspection Date)=2004
Designing a "totals" query in the design grid produces:
SELECT [Harms and Steven ].inspectionID, Count([Harms and
Steven ].inspectionID) AS CountOfinspecti onID FROM [Harms and Steven ]
WHERE ((([Harms and Steven ].[inspection date]) Between #1/1/2004# And
#12/31/2004#))
GROUP BY [Harms and Steven]. inspectionID
- where "inspection ID" = the unique inspection record key field
-Ed
<ra*********@ho tmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . Greetings ... I have a table named Harms and Steven with a field named inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#))
The DateSerial function requires 3 arguments: a year, a month and a day.
Try WHERE Year([inspection date]) = 2004
--
Doug Steele, Microsoft Access MVP http://I.Am/DougSteele
(no e-mails, please!)
<ra*********@ho tmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. . Greetings ... I have a table named Harms and Steven with a field named inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing wrong?
Thanks.
WHERE (DateSerial(Yea r([inspection date]),)=#2004#)) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Harvey |
last post by:
Hi,
I try to write an asp query form that lets client search any text-string and
display all pages in my web server that contain the text. I have IIS 6.0 on a
server 2003. The MSDN site says there is a sample file called Ixtrasp.asp,
but I could not find it in my system although I installed indexing service. I
followed the steps in MSDN site to create a basic .asp query form (too long
to post it here), but it always displays:
No...
|
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.
>
|
by: Jeremy Wallace |
last post by:
I have some code that uses DateSerial to populate a couple of text boxes on
a form. I was doing some testing this afternoon and found that I get funny
values if the year supplied is 99. 98 works fine. 04 works fine. 1999 works
fine. 100 works fine. But 98 gives a funny value. Anyone have thoughts on
why, or how to re-form the dateserial call to deal with this?
Here's some results from the immediate window:
?(DateSerial(98 , 12+ 1, 1)) -...
|
by: ralph_noble |
last post by:
Greetings ... I have a table named Harms and Steven with a field named
inspector (text) and inspection date (date/time).
I need to count up how many times the inspector appears for any
inspections occured in 2004.
Here's what I have, but it's giving me problems ... what am I doing
wrong?
Thanks.
|
by: Kenny |
last post by:
I am having issues with the "Date.ToOADate" method in
VB .NET. I understand that in VB6 the function DateSerial
gives an internal representation of the date.
When I use the DateSerial method in VB .Net, dragging the
mouse over to the statement, VB .NET reports the following
"Conversion from 'Date' to "Double' requires calling
the 'Date.ToOAdate' method.
When I tyoe this method in, the syntax checker undelines
| |
by: jerry.ranch |
last post by:
I see that DateSerial can be used to "concatenate", in a way, three
fields DateSerial(year, month day) into a date field (if year , month
and date are numeric values). Unfortunately, my Month field is Text
(January, February etc).
What function is used to convert text month to numerical 1-12?
Thanks
Jerry
|
by: woooopa |
last post by:
Something like this...
MAX (DateSerial(!,!,!))
|
by: RZ15 |
last post by:
Hi,
I have a query that calculates the sum of branch transfers for the current quarter. Here is my Quarter-to-Date field:
QTD-In: Sum(CCur(IIf(="TRN" And Between DateSerial(Year(Date()),Int((Month(Date())-1)/3)*3+1,1) And DateSerial(Year(Date()),Int((Month(Date())-1)/3)*3+4,0),*!,0)))
Now, I need to make sure I understand the DateSerials, which I think I do but I'd rather be safe than sorry.
For DateSerial(Year(Date()),...
|
by: ringer |
last post by:
On a form I have a combo where a month is entered. It shows the month names
in column one, but it is bound to column two where each month's corresponding
number is, ie Jan=1, Feb=2, etc. So selecting April returns 4. Also on the
form I have a text box where a number is entered and used as the date of the
month in the aforementioned combo box.
I pull those numbers (month number from the combo and date number from the
text box) together...
|
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,...
|
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...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |