Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I calculating between 2 date fields.

Status
Not open for further replies.

23457078

Technical User
Mar 24, 2004
2
NL
mysql> select * from seizoen;
+----------+------------+------------+-----------+
| seizoen | begin | end | categorie |
+----------+------------+------------+-----------+
| 20032004 | 1995-06-01 | 1997-06-01 | F |
| 20032004 | 1997-06-01 | 1999-06-01 | E |
+----------+------------+------------+-----------+
2 rows in set (0.00 sec)

I was borne at 1995-01-27 and when i select * whats my
categorie F or E.
 
sorry,


I ment the date is '1995-08-01' and how can i get the right
categorie. Something like
'select categorie from seizoen where '1995-08-01' between
begin and end;'



 
something like? exactly like
Code:
select categorie 
  from seizoen 
 where '1995-08-01' between begin and end

rudy
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top