Frage

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!

War es hilfreich?

Lösung

SELECT *, CONVERT_TZ(FROM_UNIXTIME(`datemade`), @@session.time_zone, '+00:00') AS convertedTime  
FROM  `wrd_project_payment_transactions`
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top