Using ASP i have used the date functions to calculate a week and the start of a month. if someone could pls assist me with displaying a report html format. If the user chooses the week option then all records for that week must be displayed and the same for the month...
thanks
Addelle

First you will need to indicate to us how you are allowing the user to make their selections, as this will impact on the code required to parse the dates.

In theory, you should be able to take a date submission from the user and build a sql BETWEEN statement. The between parameters would either be the start and end date of a month, or start and end date of a week in a month.

So, for example, if the user selected a single month, then the generated sql statement would be something like:

sql = "select * from tablename where datefield => {1stofsubmittedmonth} AND datefield <= {lastofsubmittedmonth}"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.