473,748 Members | 2,471 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

date criteria in VB Express query

In Microsoft Access I can write a query that includes the criteria:

Between Date()-7 And Date()

to retrieve the records from a table that fall within the last week.

I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.

What's the best syntax to use? I'm working in the Query Designer.

Thanks!
Daniel

Oct 12 '06 #1
10 3275
Daniel,

Can you show us the query (is it an SQL procedure), than we get probably
better at your problem.

I do by instance not know the statement "Between"

Cor

"Daniel" <da**********@g mail.comschreef in bericht
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
In Microsoft Access I can write a query that includes the criteria:

Between Date()-7 And Date()

to retrieve the records from a table that fall within the last week.

I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.

What's the best syntax to use? I'm working in the Query Designer.

Thanks!
Daniel

Oct 13 '06 #2
Well, in Access I would write this query to get the results I want:

SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();

This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.

How do I write this query in VB 2005 Express in the Query Designer? I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database you
are querying. But instead, it seem to be passing the literal value of
my query directly to Jet.

Thanks so much!

On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,

Can you show us the query (is it an SQL procedure), than we get probably
better at your problem.

I do by instance not know the statement "Between"

Cor

"Daniel" <danielcre...@g mail.comschreef in berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
In Microsoft Access I can write a query that includes the criteria:
Between Date()-7 And Date()
to retrieve the records from a table that fall within the last week.
I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.
What's the best syntax to use? I'm working in the Query Designer.
Thanks!
Daniel
Oct 13 '06 #3
How about using the following as you're query:

<pseudocode>

SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and tblDates.entry_ date < " & now().tostring( )
</pseudocode>

Thanks,

Seth Rowe
Daniel wrote:
Well, in Access I would write this query to get the results I want:

SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();

This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.

How do I write this query in VB 2005 Express in the Query Designer? I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database you
are querying. But instead, it seem to be passing the literal value of
my query directly to Jet.

Thanks so much!

On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,

Can you show us the query (is it an SQL procedure), than we get probably
better at your problem.

I do by instance not know the statement "Between"

Cor

"Daniel" <danielcre...@g mail.comschreef in berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
In Microsoft Access I can write a query that includes the criteria:
Between Date()-7 And Date()
to retrieve the records from a table that fall within the last week.
I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.
What's the best syntax to use? I'm working in the Query Designer.
Thanks!
Daniel
Oct 13 '06 #4
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and tblDates.entry_ date < " &
now().tostring( )
Oops, left out an equals sign:

SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and tblDates.entry_ date <= " & now().tostring( )
Thanks,

Seth Rowe
rowe_newsgroups wrote:
How about using the following as you're query:

<pseudocode>

SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and tblDates.entry_ date < " & now().tostring( )

</pseudocode>

Thanks,

Seth Rowe
Daniel wrote:
Well, in Access I would write this query to get the results I want:

SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();

This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.

How do I write this query in VB 2005 Express in the Query Designer? I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database you
are querying. But instead, it seem to be passing the literal value of
my query directly to Jet.

Thanks so much!

On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,
>
Can you show us the query (is it an SQL procedure), than we get probably
better at your problem.
>
I do by instance not know the statement "Between"
>
Cor
>
"Daniel" <danielcre...@g mail.comschreef in berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
>
In Microsoft Access I can write a query that includes the criteria:
>
Between Date()-7 And Date()
>
to retrieve the records from a table that fall within the last week.
>
I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.
>
What's the best syntax to use? I'm working in the Query Designer.
>
Thanks!
Daniel
Oct 13 '06 #5
Rowe,

Only as addition: and than with parameters.

http://www.vb-tips.com/dbpages.aspx?...3-eb8b44af0137

Cor

"rowe_newsgroup s" <ro********@yah oo.comschreef in bericht
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
>SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry _date < " &
now().tostring ()

Oops, left out an equals sign:

SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entr y_date <= " & now().tostring( )

Thanks,

Seth Rowe
rowe_newsgroups wrote:
>How about using the following as you're query:

<pseudocode>

SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry _date < " & now().tostring( )

</pseudocode>

Thanks,

Seth Rowe
Daniel wrote:
Well, in Access I would write this query to get the results I want:

SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();

This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.

How do I write this query in VB 2005 Express in the Query Designer? I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database you
are querying. But instead, it seem to be passing the literal value of
my query directly to Jet.

Thanks so much!

On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,

Can you show us the query (is it an SQL procedure), than we get
probably
better at your problem.

I do by instance not know the statement "Between"

Cor

"Daniel" <danielcre...@g mail.comschreef in
berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...

In Microsoft Access I can write a query that includes the criteria:

Between Date()-7 And Date()

to retrieve the records from a table that fall within the last
week.

I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.

What's the best syntax to use? I'm working in the Query Designer.

Thanks!
Daniel

Oct 13 '06 #6
Thanks. I could do this from code. But my question is: How do you enter
parameters that are created on the fly by a function call in the query
designer?

I know if Access can do it, .NET can do it too...somehow!


On Oct 13, 12:50 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Rowe,

Only as addition: and than with parameters.

http://www.vb-tips.com/dbpages.aspx?...ff-aaa3-eb8b44...

Cor

"rowe_newsgroup s" <rowe_em...@yah oo.comschreef in berichtnews:11* *************** ******@b28g2000 cwb.googlegroup s.com...
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry_ date < " &
now().tostring( )
Oops, left out an equals sign:
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry _date <= " & now().tostring( )
Thanks,
Seth Rowe
rowe_newsgroups wrote:
How about using the following as you're query:
<pseudocode>
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry_ date < " & now().tostring( )
</pseudocode>
Thanks,
Seth Rowe
Daniel wrote:
Well, in Access I would write this query to get the results I want:
SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();
This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.
How do I write this query in VB 2005 Express in the Query Designer? I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database you
are querying. But instead, it seem to be passing the literal value of
my query directly to Jet.
Thanks so much!
On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,
Can you show us the query (is it an SQL procedure), than we get
probably
better at your problem.
I do by instance not know the statement "Between"
Cor
"Daniel" <danielcre...@g mail.comschreef in
berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
In Microsoft Access I can write a query that includes the criteria:
Between Date()-7 And Date()
to retrieve the records from a table that fall within the last
week.
I'm trying to write a procedure to do this in VB.NET (2005 Express
Edition). But I always get the message that the Jet database engine
does not recognize the syntax (of the Date function I assume). I've
also tried Now() and it works but only by itself. I seem to add or
subtract time from it.
What's the best syntax to use? I'm working in the Query Designer.
Thanks!
Daniel
Oct 13 '06 #7
Daniel,

In the same way, but not in the designer of course.

Use the intelisence for that, to find the names of your paremeters.

Cor

"Daniel" <da**********@g mail.comschreef in bericht
news:11******** *************@f 16g2000cwb.goog legroups.com...
Thanks. I could do this from code. But my question is: How do you enter
parameters that are created on the fly by a function call in the query
designer?

I know if Access can do it, .NET can do it too...somehow!


On Oct 13, 12:50 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
>Rowe,

Only as addition: and than with parameters.

http://www.vb-tips.com/dbpages.aspx?...ff-aaa3-eb8b44...

Cor

"rowe_newsgrou ps" <rowe_em...@yah oo.comschreef in
berichtnews:11 *************** *******@b28g200 0cwb.googlegrou ps.com...
>SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry _date < " &
now().tostring ()
Oops, left out an equals sign:
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entr y_date <= " & now().tostring( )
Thanks,
Seth Rowe
rowe_newsgroups wrote:
How about using the following as you're query:
><pseudocode>
>SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry _date < " & now().tostring( )
></pseudocode>
>Thanks,
>Seth Rowe
>Daniel wrote:
Well, in Access I would write this query to get the results I want:
SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();
This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.
How do I write this query in VB 2005 Express in the Query Designer?
I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database
you
are querying. But instead, it seem to be passing the literal value
of
my query directly to Jet.
Thanks so much!
On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,
Can you show us the query (is it an SQL procedure), than we get
probably
better at your problem.
I do by instance not know the statement "Between"
Cor
"Daniel" <danielcre...@g mail.comschreef in
berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
In Microsoft Access I can write a query that includes the
criteria:
Between Date()-7 And Date()
to retrieve the records from a table that fall within the last
week.
I'm trying to write a procedure to do this in VB.NET (2005
Express
Edition). But I always get the message that the Jet database
engine
does not recognize the syntax (of the Date function I assume).
I've
also tried Now() and it works but only by itself. I seem to add
or
subtract time from it.
What's the best syntax to use? I'm working in the Query
Designer.
Thanks!
Daniel

Oct 13 '06 #8
So you're saying that it's not possible to enter a function call as an
SQL query parameter in VB's Query Designer?

On Oct 13, 1:35 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,

In the same way, but not in the designer of course.

Use the intelisence for that, to find the names of your paremeters.

Cor

"Daniel" <danielcre...@g mail.comschreef in berichtnews:11* *************** *****@f16g2000c wb.googlegroups .com...
Thanks. I could do this from code. But my question is: How do you enter
parameters that are created on the fly by a function call in the query
designer?
I know if Access can do it, .NET can do it too...somehow!
On Oct 13, 12:50 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Rowe,
Only as addition: and than with parameters.
>http://www.vb-tips.com/dbpages.aspx?...ff-aaa3-eb8b44...
Cor
"rowe_newsgroup s" <rowe_em...@yah oo.comschreef in
berichtnews:11* *************** ******@b28g2000 cwb.googlegroup s.com...
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry_ date < " &
now().tostring( )
Oops, left out an equals sign:
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry _date <= " & now().tostring( )
Thanks,
Seth Rowe
rowe_newsgroups wrote:
How about using the following as you're query:
<pseudocode>
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
tblDates.entry_ date < " & now().tostring( )
</pseudocode>
Thanks,
Seth Rowe
Daniel wrote:
Well, in Access I would write this query to get the results I want:
SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();
This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.
How do I write this query in VB 2005 Express in the Query Designer?
I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database
you
are querying. But instead, it seem to be passing the literal value
of
my query directly to Jet.
Thanks so much!
On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,
Can you show us the query (is it an SQL procedure), than we get
probably
better at your problem.
I do by instance not know the statement "Between"
Cor
"Daniel" <danielcre...@g mail.comschreef in
berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
In Microsoft Access I can write a query that includes the
criteria:
Between Date()-7 And Date()
to retrieve the records from a table that fall within the last
week.
I'm trying to write a procedure to do this in VB.NET (2005
Express
Edition). But I always get the message that the Jet database
engine
does not recognize the syntax (of the Date function I assume).
I've
also tried Now() and it works but only by itself. I seem to add
or
subtract time from it.
What's the best syntax to use? I'm working in the Query
Designer.
Thanks!
Daniel
Oct 13 '06 #9
It may be possible (I don't know for sure - I don't use the designer),
but why would you? Personally, I like to have direct control over what
goes in to my programs, it increases you knowledge of the language
(instead of the ide) and can also prevent subtle errors from creeping
into your code. The designer doesn't know everything your project does
and might generate conflicting or inefficient code.

Just my thoughts,

Seth Rowe
Daniel wrote:
So you're saying that it's not possible to enter a function call as an
SQL query parameter in VB's Query Designer?

On Oct 13, 1:35 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,

In the same way, but not in the designer of course.

Use the intelisence for that, to find the names of your paremeters.

Cor

"Daniel" <danielcre...@g mail.comschreef in berichtnews:11* *************** *****@f16g2000c wb.googlegroups .com...
Thanks. I could do this from code. But my question is: How do you enter
parameters that are created on the fly by a function call in the query
designer?
I know if Access can do it, .NET can do it too...somehow!
On Oct 13, 12:50 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
>Rowe,
>Only as addition: and than with parameters.
>>http://www.vb-tips.com/dbpages.aspx?...ff-aaa3-eb8b44...
>Cor
>"rowe_newsgrou ps" <rowe_em...@yah oo.comschreef in
>berichtnews:11 *************** *******@b28g200 0cwb.googlegrou ps.com...
>SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
>tblDates.entry _date < " &
>now().tostring ()
Oops, left out an equals sign:
SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
>>tblDates.entr y_date <= " & now().tostring( )
Thanks,
Seth Rowe
rowe_newsgroups wrote:
>How about using the following as you're query:
><pseudocode>
>SQLstring = "SELECT tblDates.* FROM tblDates WHERE tblDates.entry_ date
>=" & DateAdd(DateInt erval.Day, -7, Now()).ToString () & " and
>tblDates.entry _date < " & now().tostring( )
></pseudocode>
>Thanks,
>Seth Rowe
>Daniel wrote:
Well, in Access I would write this query to get the results I want:
SELECT tblDates.* FROM tblDates
WHERE tblDates.entry_ date BETWEEN Date()-7 And Date();
This uses the built in Date() function which retrieves the current
system date to pull everything from the "tblDates" table that has an
entry_date within the last 7 days.
How do I write this query in VB 2005 Express in the Query Designer?
I
am working with an OLEDB connection object linked to my Access 2003
(Microsoft Jet 4.0) database. The problem seems to be that when the
TableAdapter object tries to query the Jet db engine, the Jet engine
returns an error that it doesn't know what the Date() function is. I
thought the whole point of the adapter object was to take your query
and translate it into syntax compatible with the type of database
you
are querying. But instead, it seem to be passing the literal value
of
my query directly to Jet.
Thanks so much!
On Oct 12, 11:43 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
wrote:
Daniel,
Can you show us the query (is it an SQL procedure), than we get
probably
better at your problem.
I do by instance not know the statement "Between"
Cor
"Daniel" <danielcre...@g mail.comschreef in
berichtnews:11* *************** ******@i42g2000 cwa.googlegroup s.com...
In Microsoft Access I can write a query that includes the
criteria:
Between Date()-7 And Date()
to retrieve the records from a table that fall within the last
week.
I'm trying to write a procedure to do this in VB.NET (2005
Express
Edition). But I always get the message that the Jet database
engine
does not recognize the syntax (of the Date function I assume).
I've
also tried Now() and it works but only by itself. I seem to add
or
subtract time from it.
What's the best syntax to use? I'm working in the Query
Designer.
Thanks!
Daniel
Oct 13 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2982
by: Kenneth | last post by:
I have a Query that consist of a lot of different sales data, and one of the colums are different date. The date goes from 1jan2003 til 31jan2003. in this Query I only want the salesdata for 1jan2003. How do I remove the dates , 2jan2003 til 31jan2003 without removing them from the table, from the Query? (Because I want to use the data for 2jan2003 etc later in other queries) -kenneth
1
1420
by: Sunil Korah | last post by:
Hi, My table contains a date field "DateOfVisit" and I have the following query SELECT Patients.PID, Patients.Lastname, Patients.FirstName, Patients.DateOfVisit, Patients.ToReport FROM Patients WHERE (((Patients.DateOfVisit)>=GetStartDate() And (Patients.DateOfVisit)<=GetEndDate()))
12
6390
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.
2
1687
by: Doug1962 | last post by:
I would like to run a query every date to extract only the records that have been added to the database within my criteria for a 24 hour period. I.E. I would like the query to extract records from 3:30 pm yesterday to 3:30 pm today. The query is automated to run at 3:30 everyday. I am unsure of hour to express hours in my date field parameter. Thanks in advance!!! Doug in Tallahassee
3
2108
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...
1
1762
by: John Feeley | last post by:
am tring to add a number of years to a dob. im doing this by adding my date+years*365.26 I get a string of numbers. I then convert the number in the next column to actual date again. I'm getting the correct date. Now I want my criteria on that column to allow me to return only date in a given to from period of my choosing. I try the between_and functions but nothing is returned. I'm guessing it's because the column is still a calculation...
2
6515
by: Julie Wardlow | last post by:
Help! I am calculating a future date using the DateAdd function in a query (the calculation also involves an IIf statement), and have managed to get this formula to produce the required result. I then want to search through the records and select those with dates (as caluclated above) within a user defined range, and so I am using a parameter query. However, this query returns dates outside of the range and appears to have particular...
1
9125
by: flumpuk | last post by:
Hi My job currently requires me to enter data from 300+ forms a month. The system which we used in Excel was slow , and theprevious guy had three workbooks for this job . I have created a table in Access with four fields
8
2779
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...
0
9530
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, 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...
0
9363
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9312
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
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 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...
1
6793
isladogs
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...
0
6073
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();...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3300
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
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.