I'm using v 3.23.46-nt and the C API.
The manual says under 'Changes in release 3.20.17' that:
Change FROM_DAYS() and WEEKDAY() to also take a full TIMESTAMP or DATETIME as
argument. Before they only took a number of type YYYYMMDD or YYMMDD.
I'm confused since this doesn't seem to be the case.
If I do SELECT from_days(731799); I get today's date. But if I try and
pass a 'timestamp' I get '0000-00-00' e.g.
SELECT from_days(now());
1) Is this a doc bug or am I not passing the 'timestamp' in the right
way?
2) I'm trying to get/set the date and time in a datetime column without
having to use formatted date strings ('yyyy-mm'dd hh:mm:ss'). I hoped to
use a long long integer to store the datetime as the number of seconds
(or any smaller unit) since the epoch. If from_days()/to_days() aren't
the functions to do this are there similar functions in mysql which
handle the time as well as the date? I don't want to use from_unixtime()
as I think the dates screw up in 2038.
Thanks,
Andy.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw