About Date

manual

Date and Time in JPQL and Criteria Queries

Shows how date and time can be used in JPQL queries. Date and time expressions may appear in JPQL queries: as date and time literals - e.g. {d '2011-12-31'} , {t ... . as parameters - when date and time values are assigned as arguments. as  path ...

 
manual

JPA Persistable Types

Explains how JPA manages types, including entity classes, embeddable classes, primitive types, wrappers, string, date, enum, collections and maps.... Simple Java data types: Primitive types, Wrappers, String, Date and Math types. Multi value types - Collections, Maps and ... Classes Simple Java Data Types Date and Time (Temporal) Types Multi Value Types ...

 
forum_thread

log entry date/time

It would be very useful if each entry in the log file has a date/time stamp. Thanks, Carl   ... would be very useful if each entry in the log file has a date/time stamp. Thanks, Carl   ... Version 2.2.2 adds date/time stamps to the log. Thank you for your suggestion. ...

 
forum_thread

Group by date / time

Hi, I'm trying to create reporting query that will return entities grouped by year / mont / day. Each entity has it's own field that holds java.lang.Date. There is no function like YEAR(), MONTH() or DAY() in ODB. So, how to build queries similar to something like this: SELECT COUNT(id) FROM stats WHERE YEAR(record_date) = 2009 GROUP BY YEAR(record_date), MONTH(record_date) or maybe something like this: ... Each entity has it's own field that holds java.lang.Date. There is no function like YEAR(), MONTH() or DAY() in ODB. So, how to ... id ) FROM stats WHERE YEAR ( record_date ) = 2009 GROUP BY YEAR ( record_date ) ...

 
manual

Literals in JPQL and Criteria Queries

Describes literals in JPQL, including null, false, true, numbers, strings, dates enums and types.... Literals String Literals Date and Time Literals Enum Literals Entity Type ... and 'ABC' are not equivalent. Date and Time Literals JPQL follows the syntax of SQL and JDBC for date ...

 
forum_thread

Grouping by date()

Hi, For some time now we can use date and time function in queries to extract part of date time (from documentation): YEAR({d '2011-12-31'}) is evaluated to 2011. MONTH({d '2011-12-31'}) is evaluated to 12. DAY({d '2011-12-31'}) is evaluated to 31. HOUR({t '23:59:00'}) is evaluated to 23. MINUTE({t '23:59:00'}) is evaluated to 59. SECOND({t '23:59:00'}) is evaluated to 0. ... Hi, For some time now we can use date and time function in queries to extract part of date time (from documentation): YEAR({d '2011-12-31'}) is ...

 
manual

Database Schema Evolution

Explains how ObjectDB handles automatically schema changes.... is automatically converted into an instance of the up to date entity class. This is done automatically in memory each time the entity ... to the new type (for instance a change from int to Date ) the fields are not considered as matching and the new field is ...

 
forum_thread

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<Integer> samplingPeriod = root.get(Counter_.samplingPeriod); Expression<Integer> delayMinutes  = cb.prod(samplingPeriod,3); //minutes to be added ... 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: ...

 
forum_thread

Internal exception when updating date filed (TemporalType.DATE)

Hello! ObjectDB version 2.5.3_02. I get internal exception when commiting update Date field (javax.persistence.TemporalType.DATE). ... I get internal exception when commiting update Date field (javax.persistence.TemporalType.DATE). [ObjectDB 2.5.3_02] javax.persistence.RollbackException Failed to ...

 
forum_thread

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. There is no such problem in code because we can set Date() object as parameter. However this is hard in explorer. You can find UTC attached to this post.   ... Hi, Today I was playing with some date-range queries in explorer and found a small problem. When you try to use ... SELECT o FROM TestObject o WHERE o . date > :someDate where o.date is java.util.Date, ...