Hello,I want to change the value that is stored in the database (timestamp) and transform it to Date Time. For example:DueDate in Database -> 1354632000DueDate in Moodle -> Due date: Tuesday, 4 December 2012, 2:40 PMIs there a function for this?Someone could help me?thank you very much
SYNTAX :select (FROM_UNIXTIME(fieldname,"format string") from tablenameExample :select id,(FROM_UNIXTIME(startdate,"%Y")) as startdate from pauls_dp_plan
Use the userdate() method from lib/moodlelib.php
userdate() is definitively a much better solution since FROM_UNIXTIME is known only on MySQL databases to my knowledge.
Perfect, using userdate () does what I want.Thank you very much to all.