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.

Template Questions /

<% if date = .... ?????


Go to End
Reply


16 Posts   1602 Views

Avatar
benni91

Community Member, 72 Posts

30 July 2011 at 5:28am

i added $Date.NiceUS to my referencepage.ss tempalte. but it didn't solve the problem :(
my output is still the whole references :(

can you help me via Teamviewer or skype remote display function?

Avatar
zenmonkey

Community Member, 532 Posts

30 July 2011 at 5:29am

I think our edits are getting crossed :)

Like I said the User setting has no effect on the way the value is Saved only in certain outputs. so just force it in the template

Here is the date refrence http://api.silverstripe.org/2.4/sapphire/model/Date.html

Avatar
benni91

Community Member, 72 Posts

30 July 2011 at 5:35am

I think you're right :D

in my template if got the date output $Date.NiceUS => e.g. 01.01.2010
but it didn't work :(

what should i do?

damn ss is getting me crazy :D

Avatar
zenmonkey

Community Member, 532 Posts

30 July 2011 at 5:35am

Unfortunately I don;t have skype set up on this my office computer, feel free to email the PHP and SS files in question to rick at designplusawesome dot com and I'll poke around :)

Avatar
benni91

Community Member, 72 Posts

30 July 2011 at 5:40am

THX!
E-Mail will be there in a few minutes. i'll send you an test acc for the site too, so you can see the problem ;)

Avatar
zenmonkey

Community Member, 532 Posts

30 July 2011 at 5:42am

NiceUS outputs 07/27/2011 for me. You could also try $Date.Nice

Avatar
benni91

Community Member, 72 Posts

30 July 2011 at 5:54am

Tried it :( doesn't work :/

got my mail?

Avatar
simon_w

Forum Moderator, 474 Posts

30 July 2011 at 8:57am

You should just be able to use $Date.Format(d.m.y) to get dd.mm.yy. $Date.Format() accepts everything that the [url=http://php.net/date]date[/url] function accepts as a format.

Go to Top