Android - Get Unix time stamp for beginning and end of day
I have an SQLite database that has an integer column to store a unix time stamp and I need to be able to query this column for specific days. I am looking for a method to return the Unix time for the beginning and end of a given day. What is the best way to do this? James McCracken Here is one way to do it. public long getStartOfDayInMillis() { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); } public long