mysql> SELECT FLOOR(54.75);
+--------------+
| FLOOR(54.75) |
+--------------+
| 54 |
+--------------+
1 row in set (0.05 sec)
Regards,
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
www.the-infoshop.com
www.giiexpress.com
www.etudes-marche.com
> -----Original Message----- > From: Mike Blezien [mailto:mickalo@frontiernet.net] > Sent: Monday, June 25, 2007 2:48 PM > To: MySQL List > Subject: Birthday format > > Hello, > > we have a simple query to calculate someones birthday: > > SELECT (TO_DAYS(CURDATE()) - TO_DAYS('1952-10-06')) / 365;
> > = 54.75 > > > Now is there away, using SQL, to remove the .75 without > rounding off. we just > want the '54' value. We can do it easy enough with our Perl > programming, but was > wondering if this can be accomplished within the actual query itself. > > TIA,
> > Mike(mickalo)Blezien > =============================== > Thunder Rain Internet Publishing > Providing Internet Solution that Work > http://www.thunder-rain.com > =============================== > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: > http://lists.mysql.com/mysql?unsub=jschwartz@the-infoshop.com > >
--
MySQL General Mailing List
For list archives:
http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=lists@pantek.com
Received on Mon Jun 25 16:06:06 2007
This archive was generated by hypermail 2.1.8
: Mon Jun 25 2007 - 16:10:04 EDT
|