Announcement Announcement Module
Collapse
No announcement yet.
check if a date type is null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • check if a date type is null

    anyone knows how? if its empty or null?

    events.get(x).getOccurredDate() == null

    thats not working. neither

    events.get(x).getOccurredDate().equals("")

  • #2
    I think you're going to have to elaborate on your question.

    You're talking about a "java.util.Date" object? You want to know when it's null? You simply check for "object == null" in a conditional statement like "if". If the object is null, that will be true. It doesn't make sense to ask if a Date object is "empty", it's not like a String object.

    If you say something "isn't working", then tell us exactly what happens and why you think it's not working.

    Comment

    Working...
    X