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

// timestamp to Date
long timestamp = 5607059900000; //Example -> in ms
Date d = new Date(timestamp );

// Date to timestamp
long timestamp = d.getTime();

//If you want the current timestamp :
Calendar c = Calendar.getInstance();
long timestamp = c.getTimeInMillis();

Also See

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

Notifications