Convert epoch to human readable date

Joon
New Contributor III
New Contributor III

Hello All,

I am trying to import users with some attributes that formatted by epoch.

I tried some approaches found here in the forum but none of them seem to work.

our version is 5.5sp3, Could I have any advice ?

below are what i have tried

- "CREATED_ON":"new java.text.SimpleDateFormat('yyyy-mm-dd').parse(new java.time.Instant().ofEpochMilli(createdAt))~#~date"

-"CREATED_ON":"createdAt~#~epochdate",

-customproperty7":"createdAt~#~millisec

9 REPLIES 9

rushikeshvartak
All-Star
All-Star

Which connector ?

  • "customproperty2": "createdate~#~epochdate"

Joon
New Contributor III
New Contributor III

using REST connection...

got this data from the target application and would like to import them to create_on and update date with readable date.

Joon_0-1671121486618.png

 

"customproperty2": "createdAt~#~epochdate"

Try above and let me know results

Joon
New Contributor III
New Contributor III

Hello,

the epoch data that I got from the target app is "1550732635000"

this is what i got below with your code which is supposed to be presented "2019-02-21 07:03:55"

Joon_0-1671161832110.png

 

 

What about millisec

Joon
New Contributor III
New Contributor III

Yes, millisec is same as epochdate.

Joon
New Contributor III
New Contributor III

Joon_0-1671163768142.pngJoon_1-1671163779355.png

 

Joon
New Contributor III
New Contributor III

I got confirmed that "epochdate" won't be working for lower than the latest sp3 from Freshdesk....

Check with them if they can backport or nor