How do I execute a query based on date?
As you can see below, I have a table with the attribute PURCHASEDATE as a timestamp.
My current query is
String query = "SELECT t FROM TransactionE t WHERE t.purchaseDate = '" + currentDate + "'";
currentDate in this case is "2013-10-22"
My query above would never return a result because of the timestamp. How do I query from a timestamp based on a date?
Thanks guys! =)