got another one for you guys out there, and thanks again for the help
with my "counting question"
this time i'm looking to select records based on date, the database
stores the date as mm/dd/yyyy time am/pm ie: 08/11/2004 2:42:28 PM and
unfortunately the field is called date
this much I know if i want to select based on date:
select from table where [date]=
it's my understanding that i need to put the name of the date field in
[] in order to prevent it from confusing it with functions etc...
however my problem is this
how do i get it to select records from the month of december i have
tried [date]='12/*/2004' and [date]='::12/*/2004::' and many other
variants that i have read about on various web sites, but it never seems
to work once again the answer is probably not as complicated as i
believe it to be, but i just can't seem to find the right answers when i
hit the search engines, so if someone can explain how this should be
done, that would be greatly appreciated
thanks 3 1426
C White wrote: got another one for you guys out there, and thanks again for the help with my "counting question"
this time i'm looking to select records based on date, the database
What database? It's always relevant. Type and version.
stores the date as mm/dd/yyyy time am/pm ie: 08/11/2004 2:42:28 PM and
Unless the field is a character field, the datetime is NOT stored like that.
it may be displayed like that, but it is not stored that way. The details of
how it is stored depends on the database.
unfortunately the field is called date
Yes, that is bad. this much I know if i want to select based on date:
select from table where [date]=
it's my understanding that i need to put the name of the date field in [] in order to prevent it from confusing it with functions etc...
Correct, unless you can change the name of the field. More reserved keywords
can be found here: http://www.aspfaq.com/show.asp?id=2080
however my problem is this
how do i get it to select records from the month of december i have tried [date]='12/*/2004' and [date]='::12/*/2004::' and many other variants that i have read about on various web sites, but it never seems to work once again the answer is probably not as complicated as i believe it to be, but i just can't seem to find the right answers when i hit the search engines, so if someone can explain how this should be done, that would be greatly appreciated
Again, it depends on the database, but basically you want to do something
like:
where [date] >= Dec.1 and [date] <= Dec 31
Now the dates will not look like that. I can't tell you how to specify the
dates until you tell us what database you are using. In the meantime, read
up on dates here: http://www.aspfaq.com/show.asp?id=2313 vbscript http://www.aspfaq.com/show.asp?id=2040 help with dates http://www.aspfaq.com/show.asp?id=2260 dd/mm/yyy confusion
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] wrote: C White wrote:
got another one for you guys out there, and thanks again for the help with my "counting question"
this time i'm looking to select records based on date, the database
What database? It's always relevant. Type and version.
stores the date as mm/dd/yyyy time am/pm ie: 08/11/2004 2:42:28 PM and
Unless the field is a character field, the datetime is NOT stored like that. it may be displayed like that, but it is not stored that way. The details of how it is stored depends on the database.
unfortunate ly the field is called date
Yes, that is bad.
this much I know if i want to select based on date:
select from table where [date]=
it's my understanding that i need to put the name of the date field in [] in order to prevent it from confusing it with functions etc...
Correct, unless you can change the name of the field. More reserved keywords can be found here: http://www.aspfaq.com/show.asp?id=2080
however my problem is this
how do i get it to select records from the month of december i have tried [date]='12/*/2004' and [date]='::12/*/2004::' and many other variants that i have read about on various web sites, but it never seems to work once again the answer is probably not as complicated as i believe it to be, but i just can't seem to find the right answers when i hit the search engines, so if someone can explain how this should be done, that would be greatly appreciated
Again, it depends on the database, but basically you want to do something like:
where [date] >= Dec.1 and [date] <= Dec 31
Now the dates will not look like that. I can't tell you how to specify the dates until you tell us what database you are using. In the meantime, read up on dates here:
http://www.aspfaq.com/show.asp?id=2313 vbscript http://www.aspfaq.com/show.asp?id=2040 help with dates http://www.aspfaq.com/show.asp?id=2260 dd/mm/yyy confusion
Bob Barrows
it's an access 2000 database, unfortunately i can't get them to change
the name of the field
many thanks for the links at first glance they appear to be what i am
looking for
Bob Barrows [MVP] wrote: C White wrote:
got another one for you guys out there, and thanks again for the help with my "counting question"
this time i'm looking to select records based on date, the database
What database? It's always relevant. Type and version.
stores the date as mm/dd/yyyy time am/pm ie: 08/11/2004 2:42:28 PM and
Unless the field is a character field, the datetime is NOT stored like that. it may be displayed like that, but it is not stored that way. The details of how it is stored depends on the database.
unfortunate ly the field is called date
Yes, that is bad.
this much I know if i want to select based on date:
select from table where [date]=
it's my understanding that i need to put the name of the date field in [] in order to prevent it from confusing it with functions etc...
Correct, unless you can change the name of the field. More reserved keywords can be found here: http://www.aspfaq.com/show.asp?id=2080
however my problem is this
how do i get it to select records from the month of december i have tried [date]='12/*/2004' and [date]='::12/*/2004::' and many other variants that i have read about on various web sites, but it never seems to work once again the answer is probably not as complicated as i believe it to be, but i just can't seem to find the right answers when i hit the search engines, so if someone can explain how this should be done, that would be greatly appreciated
Again, it depends on the database, but basically you want to do something like:
where [date] >= Dec.1 and [date] <= Dec 31
Now the dates will not look like that. I can't tell you how to specify the dates until you tell us what database you are using. In the meantime, read up on dates here:
http://www.aspfaq.com/show.asp?id=2313 vbscript http://www.aspfaq.com/show.asp?id=2040 help with dates http://www.aspfaq.com/show.asp?id=2260 dd/mm/yyy confusion
Bob Barrows
between your example and the links I managed to figure it out:
([Date] >= #12/1/2004# and [Date] <=#12/31/2004#)
gives me everything for december
thanks again, once again it wasn't as hard as i was making it out to be,
once someone who knew what they were doing pointed me in the right direction This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve Elliott |
last post by:
I have a query set up to gather together data between two specified dates.
Shown in the query column as:
Between #24/09/2004# And #01/10/2004#
Is it possible to enter several different date ranges, ie between 24/09/2004
and 01/10/2004 together with 05/10/2004 and 07/10/2004 ?
If I enter the "Between" criteria on different lines it returns no data.
|
by: manning_news |
last post by:
Using A2K. I've been asked to modify a report currently requiring only
one date parameter to now accept a date range. The main report has 2
subreports and is not bound to a table or query. The report prints
dental and hygenist appointments for the date (one subreport for each).
The user wants to enter a date range and have one page for each date
in the date range. I'm wondering how to modify the report. The only
way I see is to create...
|
by: bcaponet |
last post by:
I have a form where a user enters a date that I will then base a query
on. In the past, I have simply placed Forms!!
into the criteria for a query and it runs as long as the form is open.
The recordset is then filtered based on what was entered in the form.
However, this strait forward approach seems to break when the form
value to be passed to a query is a date. I have a format and input
mask of ShortDate placed on the form. It is an...
|
by: Rinee |
last post by:
Hi,
I have a database of a bunch of contractors who have signed a safety
agreement with us, their contact info, their insurance info, etc. Each
was assigned an ID number as the main key. Each contractor agreement
has an expiry date. I have a report that lists the contractors and a
couple other relevant fields for reference for our company employees.
But I don't want a contractor to appear on this report (which looks
like a list of...
|
by: dympna |
last post by:
Hi can anyone suggest a fix for this... as I am a novice in access.
I have created a training table with the following fields
Employee Name - joe
Training Received - Fork lift
Date Received - 20/6/07
Certificate - yes
What I want to create is a renewal date for this training, there are
| |
by: Scotter |
last post by:
Hi, I've been trying to make a report that will show the deliverys to be made between 2 dates, or the deliverys to be made after a certian date, or the deliveries that were made before a certian date, based on criteria in a form.
At this point I have the report based on the query, and the dates bieng pulled from the form.
I can't seem to get the syntax right. In the query's WHERE statement I have <!!. In the form, the field DelDate's...
|
by: Dr Al |
last post by:
I have a table with four date fields, some of which may not be filled
in based on our data entry needs. I have a criteria set as <date()-180
which is supposed to pull dates older than 180 days ago. The problem
is that when I use that criteria for all four fields I am not getting
the expected results.
I am trying to find out from this query is the date in date field one
is older than 180, same thing for the other three date fields. For...
|
by: =?Utf-8?B?QnJ5YW4=?= |
last post by:
Hello group.
I've migrated from Win 2003 server to Win 2008 server.
I've been banging my head agaist a wall for several days now trying to
figure this out.
I have the following script that will search the file system and return file
names of all files within a folder and subfolders that meet the search
criteria of DateLastModified.
To test the output, you can use the following link:
|
by: kashif73 |
last post by:
Hi,
I want to export data from 4 Access tables to Excel using VBA. The user selects 2 different DATES from the form & based on DATEs criteria all record from 4 tables should be extracted to excel.
I can extract data from Table 1 to excel, which has the DATE field. But other 3 tables doesn't have this DATE field. I was wondering how can I get data in Excel from other 3 tables??
All 4 tables have 1 field in common "REFNO". This field is the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: 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: 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...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |