473,327 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Help on reports using dates

64
I have a Date field in my database...

today
$query = 'SELECT * FROM 'table' WHERE Date = today';

Past seven days
$query = 'SELECT * FROM 'table' WHERE Date - 7';

Choose month( drop down preferably)

$query = 'SELECT * FROM 'table' WHERE Date = "'.$_POST['monthselected'].'"';

Please help on how to do the SQLs based on date

my dates are stored in mysql with field type DATETIME so they give date and time.
Jul 26 '07 #1
2 1009
bartonc
6,596 Expert 4TB
Hi gnawz. Perhaps you couldn't find your other post or maybe you temporarily lost your way around the site. In any case, double posting of a question is one of the things that is discouraged on this site, as stated in our Posting Guidelines. Please take some time to become familiar with them. Thank you.
Jul 26 '07 #2
dafodil
392 256MB
Hey gnawz heres the link to your other post:
http://www.thescripts.com/forum/thread682854.html
Jul 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: paii | last post by:
I have a table that stores job milestone dates. The 2 milestones I am interested in are "Ship Date" TypeID 1 and "Revised Ship Date" TypeID 18. All jobs have TypeID 1 only some jobs have TypeID 18....
7
by: DD | last post by:
Hi I want the user to be able to view all reports from a form either by way of a list box or dropdown or ?? any help please DD
7
by: SharkSYA | last post by:
After canvassing ideas it appears that the way I need to do it is not possible.There are 126 rooms, more to be added, and it needs to print a report or reports showing 76 days of bookings. There...
5
by: MHenry | last post by:
Hi, I don't know what happened, but all the MS Access dates in all tables, queries, forms, and reports in all databases suddenly show on my computer with the year as 4 digits (including network...
1
by: Melissa Kay Beeline | last post by:
OK, here's the sitch : we have an access control system at work that registers ever entry/exit of every employee. I recently made some queries in Access so the ppl in HR could make reports (who...
1
by: longtim | last post by:
I have been having endless difficulty creating reports/queries that set any relevent parameters from controls in forms. I am creating an application under access 2003 but will target access...
1
by: prabhukalyan | last post by:
Hi all, I am not so good in queries. here is my problem 2 tables to store the received items (fabric)-- inwardmaster, inwarddetails and after some processing (Dyeing) the items were...
4
by: Dixie | last post by:
I have a spreadsheet that uses VBA code in Access to save itself as a text file. The line is as follows. xl.ActiveSheet.SaveAs CurrentProject.Path & "\Reports\" & DLookup("", "tblButtons",...
3
by: lushh | last post by:
hi guys. i am currently using ms access 2003. i want to export my reports to an excel file so i did a code like this: Private Sub cmdActiveListByEmployeeID_Click() On Error GoTo...
10
by: c9stealth | last post by:
I'm new to this Forum and to Microsoft Access, so that being said I'm sure this is an easy fix. I am making a database for my unit and I am stuck on my gains loss reports. I've tried using the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.