Date field displays in Unix Style in language customization string.

Date field displays in Unix Style in language customization string.

by Ratish Saini -
Number of replies: 0

Moodle 3.10.3

I have entered the following string in the language customization file for a plugin. profile_field_licenceexpiry is an extra date type field created in the user profile.

$string['licence_expiry']='Licence Expiry Date: {$a->profile_field_licenceexpiry}';

But it displays the time in Unix style number of seconds. I want it to display in date format.

I have tried
$string['licence_expiry']='Licence Expiry Date:userdate({$a->profile_field_licenceexpiry})';
$string['licence_expiry']='Licence Expiry Date: {$a->userdate(profile_field_licenceexpiry})';

Nothing worked;
How can I get it displayed in Date format?

What should be the correct syntax?

Average of ratings: -