Copy link to clipboard
Copied
I have the following table:
tbl_jobs
======================
id date
======================
1 06-10-2010
2 06-15-2010
3 04-13-2010
4 05-05-2010
5 02-02-2010
I am trying to do a query on this table to be able to get all the id's that have a date with the month 06.
Does anyone know how i could do something like this?
What kind of database are you hitting? Most have date functions such as Month() that will strip the month out of your date. So something like:
SELECT *
FROM tbl_jobs
WHERE Month(date) = 6
Copy link to clipboard
Copied
Your best bet is a good old SQL statement.
Copy link to clipboard
Copied
How would the sql statement look like:
SELECT *
FROM tbl_jobs
WHERE date ????
Copy link to clipboard
Copied
What kind of database are you hitting? Most have date functions such as Month() that will strip the month out of your date. So something like:
SELECT *
FROM tbl_jobs
WHERE Month(date) = 6
Copy link to clipboard
Copied
Perfect, that worked liked a champ. Thanks a lot, appreciate your help.