Re: [appengine-java] Re: date comparison fails

2011-08-17 Thread Simon Knott
Hi, Have you tried the following on the Calendar object? today.set(Calendar.MILLISECOND, 0); Cheers, Simon -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit

Re: [appengine-java] Re: date comparison fails

2011-08-17 Thread Vik
thanks a lot this was the issue. Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Wed, Aug 17, 2011 at 1:41 PM, Simon Knott knott.si...@gmail.com wrote: Hi, Have you tried the following on the Calendar object? today.set(Calendar.MILLISECOND, 0); Cheers,

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Vik
Hie This has become blocking for us. Please advise Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Sun, Aug 14, 2011 at 5:46 PM, Vik vik@gmail.com wrote: Does not work for me Not sure why it fails . I even tried: Query query =

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Simon Knott
A few questions: - Is this happening on your development or production server? - Have you created any custom indexes? - Also, have you turned off property indexes at all? Cheers, Simon -- You received this message because you are subscribed to the Google Groups Google App Engine

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Vik
Hie This is happening on my development server. I have not created any indexes at all. My local index files has an entry relevant to this (generated automaticaly) as: datastore-index kind=AdUsage ancestor=false source=auto property name=vendorSeq direction=asc/ property

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Simon Knott
Can you post your Entity class, with annotations, and the code for setting up the today variable in the query? My only guess at the moment is that the millisecond component of the date is not equal. -- You received this message because you are subscribed to the Google Groups Google App

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Vik
Hie Here is the class: public class AdUsage { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Long adUsageId; @Persistent private Long vendorSeq; @Persistent private Long smsUsed; @Persistent private Date smsUseDate; public AdUsage(Long vendorSeq, Long

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Simon Knott
Hmm, can you please check the milliseconds components of both the stored object and your query object. You're resetting all properties of the time apart from the milliseconds bit! -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group.

Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Vik
Assuming it may differ and causing the issues then what is the right way to do this? I dont see set millisec component to 0 in calendar or date object Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Wed, Aug 17, 2011 at 11:10 AM, Simon Knott

Re: [appengine-java] Re: date comparison fails

2011-08-14 Thread Vik
Does not work for me Not sure why it fails . I even tried: Query query = pm.newQuery(AdUsage.class); query.setFilter(smsUseDate = smsUseDateParam smsUseDate = smsUseDateParam + vendorSeq == vendorSeqParam); query.declareParameters(java.util.Date smsUseDateParam, Long vendorSeqParam);

[appengine-java] Re: date comparison fails

2011-08-11 Thread Vik
any help on this plz? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Aug 9, 2011 at 8:51 PM, Vik vik@gmail.com wrote: Hie I am trying to execute following query: Query query = pm.newQuery(AdUsage.class, smsUseDate == :smsUseDate + vendorSeq

Re: [appengine-java] Re: date comparison fails

2011-08-11 Thread suchitra nair
hey .. check out the following link.. M not sure but i guess in gae we can have more than 1 inequality operators on a single property. So as suggested in the following link, u cn chk for = and also add = on ur date field and the result should give records with date '=' to that of ur date value ..

[appengine-java] Re: date comparison fails

2011-08-09 Thread Vik
any advise on this plz? Thankx and Regards Vik Founder http://www.sakshum.org http://blog.sakshum.org On Tue, Aug 9, 2011 at 8:51 PM, Vik vik@gmail.com wrote: Hie I am trying to execute following query: Query query = pm.newQuery(AdUsage.class, smsUseDate == :smsUseDate +