@Now
uses a java.util.Date
, which includes time portions. .getDateOnly()
is probably throwing an error because that returns a String.
The underlying session.createDateTime()
method accepts either text, a java.util.Date
or a java.util.Calendar
. I think all of them need to include a time element.
If you're only storing the value for reference, I'd agree with brso05 to not worry.
If you're ever likely to use @Adjust (or an equivalent), then not worrying about the time is a recipe for disaster, because every time you try to adjust, you need to remember to take into account Daylight Savings Time.
One option is to set the time to 12:00 midday. That means DST will not be a problem.
java.sql.Date
is specifically designed to only include the Date portion, without a time element. Jesse Gallagher talks about java.sql.Date
in the context of his frostillic.us framework https://frostillic.us/f.nsf/posts/32A63DD640D868D885257D18006659A9 and he was the one I found out about java.sql.Date
from. I'm not sure how he stores those values though.
I'm not sure if the OpenNTF Domino API will allow you to just pass a java.sql.Date
to a field and so store just the date portion.