Manual

datetime functions

dateformat($date,$format[,$offset]) {#dateformat}

{{lang:php}}
echo dateformat($date,'d.m.Y');
// 23.12.2008
echo dateformat($date,$CONFIG['datetime_format']);
// 17.07.2008 12:34:58
echo dateformat($date,$CONFIG['datetime_format'],'-1 day');
// 16.07.2008 12:34:58

duration($second) {#duration}

{{lang:php}}
echo duration(125);
// 2m 5s
Try myPortal 2: