About date

11-20 of 200Refresh
Forum
24

Date field Index is corrupted due to time change

, which affects indexes on pure Date fields (i.e. date with no time). ObjectDB converts pure date values ... at the time of the time change. However, what values in the date fields will cause the corruption ... more details on how the corruption actually happens? It could happen if during writing a pure date
Forum
24

How to add minutes to a Date with JPA2

Hi,  I have to sum to a date of minutes, and check the date obtained is greater than the current date. My idea is as follows: Calendar currentTime = Calendar.getInstance(); Date currenteDate = currentTime.getTime(); Expression<Date> dateCapture = root.get(Counter_.dateCapture); Expression
Manual
24

Literals in JPQL and Criteria Queries

equivalent. Date and Time Literals JPQL follows the syntax of SQL and JDBC for date literals: Date - {d ... .literal("JPA"); // Date and Time literals: ExpressionDate> today = cb.literal(new java.sql.Date()); Expression time = cb.literal(new java.sql.Time()); Expression
Forum
23

java.sql.Date equals comparison not working with CriteriaAPI

Hello, Using ODB 2.4.5 and the Criteria API, doing a simple equals comparison with java.sql.Date ... = ...; Root root = ...; java.sql.Date myDate = ...; Predicate predicate = builder.equal ... except if the given date is exactly the same like the value of eintritt field in the DB. java.sql.Date is used
Forum
23

Grouping by date()

Hi, For some time now we can use date and time function in queries to extract part of date time ... have to group by date(). For few queries I was concatenating 'date' from year()-month()-day() calls ... to add one more method to above list - date() - that will return only date from java.util.Date field
Forum
22

Problem with 'where' and date()

Hi, Today I was playing with some date-range queries in explorer and found a small problem. When you try to use queries like this: SELECT o from TestObject o where o.date > :someDate where o.date is java.util.Date, 'where' doesn't work as it should. Results are not filtered by date
Forum
22

GWT RPC is throwing serialization exception when I have object db date value

Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'objectdb.java.util.Date ... .java.util.Date class is a subclass of java.util.Date that ObjectDB uses in order to track changes. It implements java.io.Serializable but probably this is not sufficient for GWT because Date is a special
Forum
22

Wrong data stored in date only fileds

Hi, we have an object with the following fields:   private Date startDateTime; // Time stamp: start of recording in local time zone private Date startDate; // Date: date part of startDateTime private Date startTime; // Time: time part of startDateTime @Basic
Forum
22

Dates

Question on dates. SQL doesn't seem to store timezone with dates (oddly). So, any best practises with ODB? 1. use java.util.Date 2. Milliseconds since January 1, 1970, 00:00:00 GMT 3. other? When a Date instance is stored in an ObjectDB database it is converted automatically to GMT, so in
Forum
22

Entity with java.util.Date column gives ClassCastException in BIRT

JPQL query to select the fields. Entity looks like this: package entity; import java.util.Date ... ="birthdate")     @Temporal(value = TemporalType.DATE)     private Date birthdate ... the birthdate      */     public Date getBirthdate() {         return birthdate