Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Изменить формат даты


Bekki
 Share

Recommended Posts

Помогите дата выводиться вот так 2013,04,15 а нужно 15,04,2013

сама дата выводиться вот так: <?php echo $record['date_added']; ?>

Link to comment
Share on other sites


Конечно, непонятно где, но ... попробуйте

файлы admin\language\russian\russian.php и catalog\language\russian\russian.php (для др. языков соответственно)

$_['date_format_short']     = 'd.m.Y';

 

посмотрите, что у вас

Link to comment
Share on other sites


  • 3 weeks later...

в контролере твоего модуля в массиве         $this->data['record'][] = array(  найди строчку -  " 'date_added'    => $result['date_added']," и замени ее на         'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
Таким образом можно будет через файл language/russiam/russian.php изменять формат даты.

  • +1 1
Link to comment
Share on other sites

  • 3 years later...

Спасибо, date($this->language->get('date_format_short'), strtotime($result['date_added']))  помогло, но выводит дату 2015-04-01 подскажите а как реализовать вместо 04 Апр? Если использовать date_format_long то выводятся полные названия месяцев.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.