Support » Fixing WordPress » database date output

Viewing 1 replies (of 1 total)
  • vtxyzzy


    WP stores its dates as a ‘datetime’ datatype – a string in the format you are getting. You need to convert this string to a ‘timestamp’ which can then be converted to your desired format.

    To use the default WP date format for your site, try this:

    $date = date_i18n(get_option('date_format'), strtotime($myrow->post_date));
Viewing 1 replies (of 1 total)
  • The topic ‘database date output’ is closed to new replies.