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

查看:22
本文介绍了在 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

推荐答案

你可以在 symfony 中在你的 indexSuccess.php 和 showSuccess.php 中制作,而不是例如:

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天全站免登陆