in reply to Problem converting with FROM_UNIXTIME

What output are you getting and what are you expecting?

Besides, I'm not sure, but doesn't $sth->fetchrow_hashref("NAME_lc") mean that ALL fieldnames are in lower case?
So I'm guessing that you want $transaction->{action_date} in stead of $transaction->{'Action_date'}...

Paul

Replies are listed 'Best First'.
Re^2: Problem converting with FROM_UNIXTIME
by ibra (Novice) on Jun 23, 2011 at 14:16 UTC
    If i edit this line
    FROM_UNIXTIME(trans_date) AS 'Action_date'
    And instead use just the column name
    SELECT serial_num, trans_date , actor, type, trans_data, content FROM + transtable
    The date values are displayed but in unix format.
      Sorry guys yep the problem was the lowercase issue. I complete missed this line
      $sth->fetchrow_hashref("NAME_lc")
      Thank you rev_1318 for spotting it