You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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).
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:
creationDateinteger
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.