Assuming this is how you get the current time in Joda time:
DateTime now = new DateTime();
How do you calculate values for the variables dateTimeAtStartOfToday and dateTimeAtEndOfToday?
What I’m trying to do is generate some SQL to do a lookup of all transactions that have occurred between the startOfToday and endOfToday.
I would use:
Then check if
startOfToday <= time < startOfTomorrowfor any particular time.Of course, it partly depends on exactly what’s stored in the database – and what time zone you’re interested in.