-
Oct 29th, 2009, 06:56 AM
#1
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("")
-
Oct 29th, 2009, 09:58 AM
#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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules