Jump to:

23459 Posts in 18906 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Null Date producing 01/01/1970

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

Page: 1
Go to End
Author Topic: 787 Views
  • Harley
    Community Member
    153 Posts

    Null Date producing 01/01/1970 Link to this post


    I know I've come across this before but can't seem to fathom this one again.

    When leaving a datefield blank I am getting a default value of 01/01/1970. What can I do to overcome this? I've tried if statements but to no avail.


  • martimiz
    Forum Moderator
    1078 Posts

    Re: Null Date producing 01/01/1970 Link to this post

    Where does this happen? If on your website, you could do a check, like:

    <% if MyDate %> Date: $MyDate.Nice <% end_if %>

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.