문제

This will be simple for you. I have a query that returns all the information in the table but the dates are all Unix timestamp and I need to convert that one column.

These are my 2 strings and I just need to know how to link them together:

Query 1:

SELECT * FROM `wrd_project_payment_transactions`

The conversion:

SELECT  CONVERT_TZ(FROM_UNIXTIME(`datemade`), @@session.time_zone, '+00:00')  
FROM  `wrd_project_payment_transactions`

I'm a noob so be gentle.

Thanks!

도움이 되었습니까?

해결책

SELECT *, CONVERT_TZ(FROM_UNIXTIME(`datemade`), @@session.time_zone, '+00:00') AS convertedTime  
FROM  `wrd_project_payment_transactions`
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top