我想将 created_at
字段日期从原始格式设置为 03.May.2011 之类的内容,以便在 indexSuccess.php
和 中显示showSuccess.php
你可以帮帮我吗?
谢谢
最佳答案
你可以在你的 indexSuccess.php 和 showSuccess.php 中使用 symfony 来代替例如:
<?php $value->getCreatedAt() ?>
下一个:
<?php echo date('d.M.Y', strtotime($value->getCreatedAt())) ?>
您可以使用 other格式。
关于date - 在 indexSuccess.php 中格式化日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7203559/