• Resolved mattheoh

    (@mattheoh)


    Hi,
    I have some birth date in my table wp_bp_xprofile_data which are in timestamp format (maybe 30% of all values)… I don’t know why yet (I think there was a problem with date picker that inserted dates to this format)
    When I run an export , these timestamp dates are not readable , it shows values as 1223769600 , -256608000 … instead date format : YYYY-MM-DD 00:00:00
    Is there a way to adapt the script to convert these timestamps ?
    Thanks per advance for your appreciated help.

    https://www.ads-software.com/plugins/export-user-data/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author qstudio

    (@qlstudio)

    This would involve forking the plugin on github and checking if the value is a valid timestamp – for example: https://stackoverflow.com/questions/2524680/check-whether-the-string-is-a-unix-timestamp

    If you come up with a good solution you could consider working in some filters for the returned value to allow for others to do similar tasks.

    Thread Starter mattheoh

    (@mattheoh)

    Thanks for your answer !
    I tried to use these pieces of code, but I m not good enough in PHP language :-/
    so finally, I made an extract of datas, and converted them under excel with a formula as :
    [Date classic format] = ( [Date Timestamp] /86400 ) + 25569)
    and then reinjected the new values in the database.
    And it worked perfectly ??
    Thanks again for your help.

    Plugin Author qstudio

    (@qlstudio)

    Great – good work!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Convert timestamps to dates’ is closed to new replies.