RE: Calculate current age with given birthday

2002-04-01 Thread Michael Stassen
On Sat, 30 Mar 2002, Paul DuBois wrote: > At 17:15 -0500 3/30/02, Michael Stassen wrote: > >On Sat, 30 Mar 2002, Paul DuBois wrote: > > > >> At 21:25 +0100 3/30/02, Roger Baklund wrote: > >> >* Son Nguyen > >> >> ==> I tried this query, but... it's not working out: > >> >>SELECT YEAR(no

RE: Calculate current age with given birthday

2002-03-30 Thread Paul DuBois
At 17:15 -0500 3/30/02, Michael Stassen wrote: >On Sat, 30 Mar 2002, Paul DuBois wrote: > >> At 21:25 +0100 3/30/02, Roger Baklund wrote: >> >* Son Nguyen >> >> ==> I tried this query, but... it's not working out: >> >>SELECT YEAR(now()-birthday) from users where loginName="test"; >> > >

RE: Calculate current age with given birthday

2002-03-30 Thread Michael Stassen
On Sat, 30 Mar 2002, Paul DuBois wrote: > At 21:25 +0100 3/30/02, Roger Baklund wrote: > >* Son Nguyen > >> ==> I tried this query, but... it's not working out: > >>SELECT YEAR(now()-birthday) from users where loginName="test"; > > > >You are very close: > > > >SELECT YEAR(now())-YEAR(birth

RE: Calculate current age with given birthday

2002-03-30 Thread Paul DuBois
At 21:25 +0100 3/30/02, Roger Baklund wrote: >* Son Nguyen >> ==> I tried this query, but... it's not working out: >>SELECT YEAR(now()-birthday) from users where loginName="test"; > >You are very close: > >SELECT YEAR(now())-YEAR(birthday) as age from users where loginName="test"; That won't

RE: Calculate current age with given birthday

2002-03-30 Thread Roger Baklund
* Son Nguyen > ==> I tried this query, but... it's not working out: > SELECT YEAR(now()-birthday) from users where loginName="test"; You are very close: SELECT YEAR(now())-YEAR(birthday) as age from users where loginName="test"; -- Roger query ---

Calculate current age with given birthday

2002-03-30 Thread Son Nguyen
How can I calculate current age with given birthday? create table users ( loginName char(30) NOT NULL, first_name char(30) NOT NULL, last_name char(30) NOT NULL, birthday date NOT NULL, primary key (loginName) ); ==> How can I use the function now() ? ==