Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
<cfscript>
CreateObject("java", "java.util.Date").from( CreateObject("java", "java.time.Instant").ofEpochMilli(JavaCast("long", 1210921200000)) )
</cfscript>
Copy link to clipboard
Copied
I know this is from a while ago, but I am working with some covid data coming out of a JSON string
{"OBJECTID":1,"COVID_Date":1584057600000,"Daily_Case_Count":2,"Cumulative_Case_Count":2,"Daily_Death_Count":0,"Cumulative_Death_Count":0,"UTC_Date":1584079200000}}
and the gross number: 1584079200000 was giving me fits!
Your string allowed me to return the right number: dateadd('s', 1584079200000/1000, createdatetime(1970, 1, 1, 0, 0, 0))
output:{ts '2020-03-13 06:00:00'}
Thanks for saving my butt!