Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creation date coming as int64

Jorge Ramirez August 3, 2022

How can i cast the int64 creation date to a date time format. 

 

I am suing the audit api (rest/api/audit) and getting the creation date as date int64( "creationDate": 1659538359474).

1 answer

0 votes
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 10, 2022

Hello @Jorge Ramirez,

Thank you for reaching out.

Per your description, I understand that you are executing a Rest API call to get the audit records on a Confluence site, as described in this documentation. Is that correct?

If that's the case, I can confirm that the parameter "creationDate" is an integer, so the only format available is int64 as described in the documentation:

 

creationDate

integer

The creation date-time of the audit record, as a timestamp. This is converted to a date-time display in the Confluence UI. If the creationDate is not specified, then it will be set to the timestamp for the current date-time.

Format: int64

As mentioned in the doc, the integer value is converted to a date-time display in the Confluence UI.

Let us know if you have any questions.

Jorge Ramirez August 11, 2022

Yes I understand is coming as an int64 what I meant with my question is how the UI changes to a date, what kind of casting or convertion is being applied?

Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 11, 2022

Hello @Jorge Ramirez

There is no public information about the method used by the Confluence UI to convert the int64 value (Milliseconds) to a date format, however, as Confluence is a Java application, I believe it uses Java.time function to convert the value, as described in the answer below:

Convert date as string int64 format 

That being said, can you let us know why you need this information? If you want to just convert that value from int64 to date and time format, you can simply use an online calculator such as the one below:

https://www.timecalculator.net/milliseconds-to-date 

Let us know if you have any questions.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events