How are the dates store in bonita database

1
0
-1

Hello,

How are the datetimes stored in the H2 database? I see a long value. Is this stored a milliseconds?

If so, how should I convert to regular date within query? I'm trying to perform some validations.

Thanks

1 answer

1
+1
-1
This one is the BEST answer!

I think it's timestamp format.

You need to change this to date format

From http://stackoverflow.com/questions/11839246/how-to-convert-timestamp-to-date-in-java

  1. // timestamp to Date
  2. long timestamp = 5607059900000; //Example -> in ms
  3. Date d = new Date(timestamp );
  4.  
  5. // Date to timestamp
  6. long timestamp = d.getTime();
  7.  
  8. //If you want the current timestamp :
  9. Calendar c = Calendar.getInstance();
  10. long timestamp = c.getTimeInMillis();

Also See

http://stackoverflow.com/questions/11634403/h2-sql-date-comparison

Notifications