在indexSuccess.php中格式化日期 [英] Format date in the indexSuccess.php

查看:92
本文介绍了在indexSuccess.php中格式化日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从原始格式化 created_at 字段日期,例如03.May.2011,以显示在 indexSuccess.php showSuccess.php
你能帮我吗?
谢谢

I want to format the created_at field date from the original for something like 03.May.2011 to be shown in the indexSuccess.php and in the showSuccess.php Could you help me? thanks

推荐答案

您可以在indexSuccess.php和showSuccess.php中使用symfony,而不是例如: / p>

You can make in symfony in your indexSuccess.php and showSuccess.php instead of for example:

 <?php $value->getCreatedAt() ?>

下一页:

 <?php echo date('d.M.Y', strtotime($value->getCreatedAt())) ?>

您可以使用 其他 格式。

You can use other formats.

这篇关于在indexSuccess.php中格式化日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆