לדעתי צריך לפתור את זה קודם כל ע"י הפיכת התאריך הזה למשהו שנוח לעבוד איתו, כמו unix timestamp, ואז אתה כבר חופשי לעשות עם זה מה שבא לך. הנה הפתרון שלי, שבוא אני הופך את התאריך ע"י שימוש בpreg_match וmktime ל unix timestamp
<?php /* (C) [email protected] */ function wierd2ts($my_time) { $wierd_time_format = "/([\d]{1,2})\.([\d]{1,2})\.([\d]{2,4})-([\d]{2,2})[\d]{2,2})[\d]{2,2})/"; if (preg_match($wierd_time_format, $my_time, $regs)) { // we got the right format, lets convert to timestamp return mktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[1], $regs[3]); } else return -1; // wrong format! } print(date("r", wierd2ts("07.10.2003-14:33:51"))); ?>