We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    I have dates stored as normal timestamps (eg. 1311800400) but when displayed in a CMP grid MODx seems to convert them to this format:
    2011-07-28 00:00:00

    I want them to be like:
    28/07/2011

    I’ve tried the following in my ’getlist.php’ processor but it just ends up as 01/01/1970:
    $list['date'] = date('d-m-Y',$list['date']);
    


    Any ideas as to how and where I need to be doing the conversion?
      • 33968
      • 863 Posts
      Oh well, this seemed to do it:
      $list['date'] = date('d-m-Y',strtotime($list['date']));