Question

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!

Was it helpful?

Solution

SELECT *, CONVERT_TZ(FROM_UNIXTIME(`datemade`), @@session.time_zone, '+00:00') AS convertedTime  
FROM  `wrd_project_payment_transactions`
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top