How to query a database between two dates?

G

Guest

I have a database that stores timesheets from employees. I access the
database from a website. I want to be able to query the database between two
dates that the user enters on the website and then display the results. How
can I do this?
 
S

Stefan B Rusynko

Are you hand coding the ASP code to access the DB or using the DBRW?
If using the DBRW set 2 criteria

--




|I have a database that stores timesheets from employees. I access the
| database from a website. I want to be able to query the database between two
| dates that the user enters on the website and then display the results. How
| can I do this?
 
G

Guest

The dates are entered on the same website and I need a method to search
between the two dates in the database.
 
S

Stefan B Rusynko

Explain how you are accessing the DB - w/ the DBRW?

--




| The dates are entered on the same website and I need a method to search
| between the two dates in the database.
|
| "Stefan B Rusynko" wrote:
|
| > Are you hand coding the ASP code to access the DB or using the DBRW?
| > If using the DBRW set 2 criteria
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > |I have a database that stores timesheets from employees. I access the
| > | database from a website. I want to be able to query the database between two
| > | dates that the user enters on the website and then display the results. How
| > | can I do this?
| >
| >
| >
 
A

Andrew Murray

Ok so set the Database results wizard to find the results between two dates.

similar to this sql query:

Select * from Table [whatever] where date1 > [date] AND date2 < [date]

Using the DB wizard should be easy enough, you don't have to write a custom
query, use the wizard to help you do it.
 
G

Guest

Thanks that works well...How can I group the outputted records, for example
by a project number.

Andrew Murray said:
Ok so set the Database results wizard to find the results between two dates.

similar to this sql query:

Select * from Table [whatever] where date1 > [date] AND date2 < [date]

Using the DB wizard should be easy enough, you don't have to write a custom
query, use the wizard to help you do it.


Mark said:
The dates are entered on the same website and I need a method to search
between the two dates in the database.
 
S

Stefan B Rusynko

Same answer
The DBRW has an option to group results and select a field to do it by

--




| Thanks that works well...How can I group the outputted records, for example
| by a project number.
|
| "Andrew Murray" wrote:
|
| > Ok so set the Database results wizard to find the results between two dates.
| >
| > similar to this sql query:
| >
| > Select * from Table [whatever] where date1 > [date] AND date2 < [date]
| >
| > Using the DB wizard should be easy enough, you don't have to write a custom
| > query, use the wizard to help you do it.
| >
| >
| > | > > The dates are entered on the same website and I need a method to search
| > > between the two dates in the database.
| > >
| > > "Stefan B Rusynko" wrote:
| > >
| > >> Are you hand coding the ASP code to access the DB or using the DBRW?
| > >> If using the DBRW set 2 criteria
| > >>
| > >> --
| > >>
| > >> _____________________________________________
| > >> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > >> "Warning - Using the F1 Key will not break anything!" (-;
| > >> To find the best Newsgroup for FrontPage support see:
| > >> http://www.net-sites.com/sitebuilder/newsgroups.asp
| > >> _____________________________________________
| > >>
| > >>
| > >> | > >> |I have a database that stores timesheets from employees. I access the
| > >> | database from a website. I want to be able to query the database
| > >> between two
| > >> | dates that the user enters on the website and then display the results.
| > >> How
| > >> | can I do this?
| > >>
| > >>
| > >>
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top