• Resolved oberning

    (@oberning)


    Hi,

    Right now the date in the user meta field “when_last_login” is stored as a big number. Is there a way to get this as a date format?

    Best regards,
    Olga

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

    (@andrewza)

    We store it as a timestamp, when retrieving the usermeta you may use the date_i18n or date PHP functions to format it to a readable date.

    I hope this helps get you started.

    Thread Starter oberning

    (@oberning)

    Hi @andrewza

    Sorry for my late reply.
    I want to use the date in a html table, unfortunately I am not able to use PHP functions in there. I believe there is no other way to output this value then?

    Best regards,
    Olga

    Plugin Author Andrew Lima

    (@andrewza)

    Sorry Olga, this slipped by me. You would need to use PHP to convert the timestamp to a specific date format.

    You would use PHP (get_user_meta) to get the value and in the same function, you then can cast it to date format when echoing it out.

    I recommend reaching out to a local WordPress developer for assistance here. There’s no way to retrieve data from the WordPress database that relies on HTML code only.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘date format user meta data’ is closed to new replies.