Revision 250f2a96
Added by Andreas Kohlbecker over 5 years ago
modules/cdm_dataportal/cdm_api/cdm_api.module | ||
---|---|---|
420 | 420 |
} |
421 | 421 |
} |
422 | 422 |
|
423 |
/** |
|
424 |
* Formats a mysql datatime as string |
|
425 |
* |
|
426 |
* @param $datetime |
|
427 |
* @param string $format |
|
428 |
* |
|
429 |
* @return |
|
430 |
* the formatted string representation of the $datetime |
|
431 |
*/ |
|
432 |
function format_datetime($datetime, $format = 'Y-m-d H:i:s'){ |
|
433 |
return date($format, strtotime($datetime)); |
|
434 |
} |
|
435 |
|
|
423 | 436 |
/** |
424 | 437 |
* Converts an ISO 8601 org.joda.time.Partial to a year. |
425 | 438 |
* |
Also available in: Unified diff
ref #7788 displaying registration date and institution - formatting the datetime