I am a newbie to PhP/MySQL , Just learning things .
I am using Userspice User management framework for my project
In the database there is table called "users"
and it has a field name "join_date"
and the field entry will look like 2016-01-01 00:00:00
it is been stored as timestamp at the time of user registration .
To output that i use the following query
<?php $user->data()->join_date; ?>
The above query as expected outputs 2016-01-01 00:00:00
But my required output is January 2016
. So , i tried the following query
<?php $user->data()->join_date->format('F Y'); ?>
but the page becomes blank . I can understand that the above query has either syntax error or logically wrong. Can you please help me with this please . I might look silly asking these small things, I am just learning stuffs.
Update :
Also i tried the following query now thinking that storing in a value and doing will help but same error of blank page .
<?php
$x = $user->data()->join_date;
$y = $x->format('F-Y');
echo $y;
?>