문제

I am trying to search my DB for records with a certain day recorded against them, where that record is a UNIX timestamp. Here is an example of one of those timestamps:

1389026993

That date is Mon, 06 Jan 2014 16:49:53 GMT

However I'm finding that my select statement

SELECT FROM_UNIXTIME('join_date')

returns this:

1970-01-01 01:00:00

Am I going wrong somewhere?

도움이 되었습니까?

해결책

Remove the single quote otherwise you are passing a string as the parameter.

SELECT FROM_UNIXTIME(join_date)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top