beachkitty85 Posted June 13, 2007 Share Posted June 13, 2007 This should be a very simple task, but it isn't (at least for me)! I want to show the date and time on all invoices. Here is the code from checkout_process.php for the invoice email: $email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG, strtotime($date_time)) . "\n"; This displays the date as Wednesday 13 June, 2007. It seems that I should be able to change the code to $email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_TIME_FORMAT, strtotime($date_time)) . "\n"; and use OSC's built in date + time format, but when I do this the date shows up as 06/13/2007 00:00:00. Thanks in advance! Link to comment Share on other sites More sharing options...
Guest Posted June 13, 2007 Share Posted June 13, 2007 try $email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . date("l j F, Y g:i:s ") . "\n\n"; Link to comment Share on other sites More sharing options...
beachkitty85 Posted June 13, 2007 Author Share Posted June 13, 2007 I used this code: $email_order .= EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_TIME_FORMAT_LONG) . "\n\n"; and then defined DATE_TIME_FORMAT_LONG in english.php like this: define('DATE_TIME_FORMAT_LONG', '%A %d %B, %Y %H:%M:%S'); Now it works like a charm! Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.