Get task created value with miliseconds

Hi,
I’m using the Rest Api to display on my system a history about a process instance, but I got some events on the same second, and I want to get the time with miliseconds to sort on a right way.
Do you know how to get the created value for a task with miliseconds?

Thanks!

HI @pipeline,

which database are you using?

Cheers,
Askar

1 Like

Hi @aakhmerov
I’m using SQL Server 2008 in production environment, but for local development i’m using H2 database.
I tried this: https://docs.camunda.org/manual/7.5/reference/rest/overview/date-format/ but no lucky…

Thanks!
Álvaro

Hi @pipeline,

which field you want to get as a timestamp? Could you verify first that it’s saved in database with milliseconds, i.e. as timestamp?

Cheers,
Askar

Hi again :slight_smile:

I want the field START_TIME_ from ACT_HI_TASKINST table. This field has datetime format, not timestamp. Maybe is not possible to get the millis?

Thanks!

@pipeline,

in h2 it’s declared START_TIME_ timestamp not null, which should give what you need. And in mssql as START_TIME_ datetime2 not null. Both types are capable of holding fractional seconds, so you could just alter your schema. Please note that if you do that you have to take care of i manually during version updates if required.

Cheers,
Askar