[Resolved] How to get value of users custom field which is date type
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Hi Team,
I have created a custom field for users, which is DATE type. I have tried retrieving that custom field value by -
$recent_working_month = 'recent-working-day-month';
$recent_working_month_value = get_user_meta( $user_id, $recent_working_month, true );
but this code is not working and I'm not getting the Date value. Please guide me how can I get the Date custom field value.
Thanks! but the date in the database is "20 June 2022" and the value I'm getting from above code id "1655683200". I didn't understand. Does it need any conversion?
Types stores custom date field value to database as Unix timestamp. You will have to convert this Unix Timestamp to readable date using PHP date funciton.