Create timestamps.

1
0
-1

Hi, I'm trying to make a timestamp in a task of my process. I've used the following code: apiAccessor.getProcessAPI().getActivityInstance(activityInstanceId).getReachedStateDate().getDateTimeString();

and I map this way: apiAccessor.processAPI.updateActivityDataInstance("fin", activityInstanceId, finn);

but the result is always 1/01/70 1:00:00. Do I have to add anything to my process to stamp the time correctly?

I hope your answers.

1 answer

1
0
-1

Hi. You want to create a timestamp with which date ? If you want to create a timestamp with the current date, you can do this :

Date today = new Date();
java.sql.Timestamp timeStampDate = new Timestamp(today.getTime());

If you already have a variable of type Date, you juste need this :

java.sql.Timestamp timeStampDate = new Timestamp(myDataVariable.getTime());

Comments

Submitted by felmarlop on Tue, 01/20/2015 - 13:31

I' ve already got, but thank you so much!

Notifications