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, biapar, Willr, Ingo, swaiba, simon_w

How do I get American formated dates?!!


Reply

2 Posts   1078 Views

Avatar
designerdre

24 July 2009 at 7:09am Community Member, 19 Posts

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

Avatar
Willr

24 July 2009 at 2:59pm Forum Moderator, 5511 Posts

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.