tooheys Posted November 12, 2006 Share Posted November 12, 2006 Hi, How can I change the standard date format to dd/mm/yyyy ?? THANKS Link to comment Share on other sites More sharing options...
Guest Posted November 12, 2006 Share Posted November 12, 2006 The date formats are defined in /includes/languages/english.php Sonia Link to comment Share on other sites More sharing options...
tooheys Posted November 12, 2006 Author Share Posted November 12, 2006 The date formats are defined in /includes/languages/english.phpSonia Yes thanks but, i have tried this.. define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = true) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } } and it still doesnt work. am i missing something else ? Link to comment Share on other sites More sharing options...
Guest Posted November 12, 2006 Share Posted November 12, 2006 Yes... the bottom part. Try this: define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format dd/mm/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2); } } Sonia Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.