Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

strftime('%d. %B %Y %H.%i', strtotime($myDateTime)) returns 06. Juni 2013 19.%i


Go to End


2136 Views

Avatar
yurigoul

Community Member, 203 Posts

2 August 2013 at 3:26am

Edited: 02/08/2013 3:28am

When using a DateTimeField strftime('%d. %B %Y %H.%i', strtotime($myDateTime)) returns 06. Juni 2013 19.%i (instead of 19.00)

I have seen that in datetime.php mm is used for the minutes, but it does not do the trick

I am not looking for a solution, I already found one: I left out the time part and used $myDateTime.Time24() in my template to get the time.

Anyone willing to create a bug report be my guest.