Search code examples
phpmysqlisodate

How do I store iso date in mysql


I am querying an API and I got a date like this: "2019-04-17T14:04:24.224-04:00". I suppose this is an iso date. How can I store the year, month and day on a mysql database? I want the following format "dd/mm/yyyy".


Solution

  • date("d-m-Y", strtotime("2019-04-17T14:04:24.224-04:00"));
    

    Just do this,