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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

How do I get American formated dates?!!

Go to End

2 Posts   1411 Views


Community Member, 19 Posts

24 July 2009 at 7:09am

$date.nice give me dd/mmm/yyyy and I need mm/dd/yyyy. Any advice?! Thanks a bunch


Forum Moderator, 5523 Posts

24 July 2009 at 2:59pm

I thought there was an $Date.NiceUS format in 2.3 but looking through I can't find it. Perhaps try using $Date.Format(m/d/Y). Format() allows you to specify the exact format of the date.