hi,
I have found some curious results from DATEDIFF builtin function.
As this:
set @bird='1990-06-11';
set @curday='2010-06-10';
select datediff('YEAR',@bird,@curday) as y ,
datediff('MONTH',@bird,@curday) as m , datediff('DAY',@bird,@curday) as
d, datediff('MONTH',@bird,@curday)/12 as yy ;
set @curday='2010-06-11';
select datediff('YEAR',@bird,current_date) as y ,
datediff('MONTH',@bird,current_date) as m ,
datediff('DAY',@bird,current_date) as d,
datediff('MONTH',@bird,current_date)/12 as yy ;
set @curday='2010-06-12';
select datediff('YEAR',@bird,current_date) as y ,
datediff('MONTH',@bird,current_date) as m ,
datediff('DAY',@bird,current_date) as d,
datediff('MONTH',@bird,current_date)/12 as yy ;
Results;
20 240 7304 20
20 240 7303 20
20 240 7303 20
I missed something or this is wrong?
Regards,
Dario
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.