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   1100 Views

Avatar
designerdre

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

Avatar
Willr

Forum Moderator, 5513 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.