0

I am querying date using QuerySpec on the basis of CREATE_TIMESTAMP ,following is my piece of code, compiler says CREATE_TIMESTAMP is a Timestamp ,whereas day is String . I have tried many work around but didn't workout

Date date=new Date();
SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
String day=format.format(date);
qs.appendWhere(new SearchCondition(QueueEntry.class,
                                   QueueEntry.CREATE_TIMESTAMP,
                                   SearchCondition.LIKE,day), 
                                   new int[] {0,1});
Andrey Korneyev
  • 26,353
  • 15
  • 70
  • 71
  • Why don't you use a TimeStamp? Also: why are you using `SearchCondition.LIKE` instead of `SearchCondition.EQUALS`? What are you trying to achieve? – JanTheGun Jul 03 '15 at 11:46
  • I actual wanted to query entries, filtering it just by date , which isnt possible with timestamp, so i used java api instead to WC api ,wrote quey itself ...altered the session and got what i want , thanks for replying man – Anant Sharma Jul 03 '15 at 11:59

0 Answers0