mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
can DateTime objects turn to string in query results? #5308
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @akmumu on GitHub (Oct 27, 2016).
Originally assigned to: @Ocramius on GitHub.
sometimes i don not need the DateTime obj,but only need the string to display
@Ocramius commented on GitHub (Oct 27, 2016):
array_map()over the results and replace theDateTimeinstances withstringviaDateTime#format()@akmumu commented on GitHub (Oct 27, 2016):
i known this way,bug do not want to array_map every,and thanks a lot
@Ocramius commented on GitHub (Oct 27, 2016):
Doctrine would have to do it for you with some complicated contraption,
while the operation itself takes 3 CLOC: just do it
On 27 Oct 2016 08:36, "Qinglong Zhang" notifications@github.com wrote:
i known this way,bug do not want to array_map every,and thanks a lot
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/doctrine/doctrine2/issues/6105#issuecomment-256558842,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJakOc6-NvPNHLWyFOVhs8dkroWYFS6ks5q4EZ2gaJpZM4Kh94n
.
@akmumu commented on GitHub (Oct 28, 2016):
ok,thanks