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 smsUsed){
this.vendorSeq = vendorSeq;
this.smsUsed = smsUsed;
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH),
cal.get(Calendar.DATE),
0, 0, 0);
this.smsUseDate = cal.getTime();
}
//removed getter setters to save space
}
Code to set today variable:
Date today = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(today);
cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH),
cal.get(Calendar.DATE),
0, 0, 0);
today = cal.getTime();
Thankx and Regards
Vik
Founder
http://www.sakshum.org
http://blog.sakshum.org
On Wed, Aug 17, 2011 at 10:33 AM, Simon Knott <[email protected]> wrote:
> 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 Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/15A6BS6YfD4J.
>
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.