How do I convert timestamps in a MySQL View?
I have a MySQL View for data exchange between 2 different software tools.
The original table is a unix timestamp as int(11). The other software expects a DATETIME.
I have a VIEW like this:
CREATE VIEW `myView` AS
select
date_format(from_unixtime(`myUnixTimestamp`),_utf8'%d/%m/%Y %H:%i:%s')
AS `Date-Entered`
from ...
This VIEW statement creates a varchar(24) - which is better than nothing as it can be converted - but the conversion makes some problems.
Is there any way to create a DATETIME field instead of a VARCHAR with the view?