MySQL - Combine two fields to create a unix timestamp?
Posted
by Dan
on Stack Overflow
See other posts from Stack Overflow
or by Dan
Published on 2010-04-21T14:55:56Z
Indexed on
2010/04/21
15:13 UTC
Read the original article
Hit count: 160
Hi,
I'm trying to retrieve a UNIX timestamp from a query by combining a date and a time field in the table, however it keeps returning as zero.
SELECT *,
UNIX_TIMESTAMP(startdate starttime) AS start,
UNIX_TIMESTAMP(enddate endtime) AS end
FROM mytable;
Can anyone help me out?
Thanks.
© Stack Overflow or respective owner