Jump to content

Recommended Posts

Posted

I need to have events, they can have startDate, startTime, endDate, endTime.

But but not all events will have a startTime, endDate, endTime.

So I made those 4 fields seperate.

But when I leave those 3 that arent always used, it puts in "12/31/1969" for the date or "07:00" for the time if they are left empty.

I am checking for null, but its not saying its null, but I left the fields empty.

:(

Posted

The date you're experiencing is when unix time is counted from (you'd have to google it to find out why - I can't remember) so a value of zero means zero seconds since that date.

Strange but true.

Posted

Of course I just realised you may already know that and the date/time field should probably know that too is probably what you mean ;)

Posted

What about doing something like this on each one of them (not tested):

if ($page->startDate != "12/31/1969") echo $page->startDate;

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...