Du kan bruge en afledt tabel (underforespørgsel i FROM-sætning):
select mydate, UNIX_TIMESTAMP(mydate)
from
(
SELECT
DATE(CONVERT_TZ(FROM_UNIXTIME(my_time + timezone_offset * 60), @@session.time_zone, '+00:00')) as mydate,
FROM my_table
);
Du kan bruge en afledt tabel (underforespørgsel i FROM-sætning):
select mydate, UNIX_TIMESTAMP(mydate)
from
(
SELECT
DATE(CONVERT_TZ(FROM_UNIXTIME(my_time + timezone_offset * 60), @@session.time_zone, '+00:00')) as mydate,
FROM my_table
);