vlsi / mat-calcite-plugin

Heap query plugin for Eclipse Memory Analyzer
Apache License 2.0
148 stars 24 forks source link

how to convert bigint to date ? #23

Open jiangxy opened 2 years ago

jiangxy commented 2 years ago

Is there a function can convert bigint to date ?

I store timestamp in memory and want to view as date(like yyyy-MM-dd ) when analysis heap.

Tried from_unixtime() but not work.

Lerm commented 7 months ago

Here is one way to convert timestamps to readable format:

select 
 d.this, 
 timestamp'1970-01-01 00:00:00.000' + interval (d.fastTime/1000) second as date_timestamp
from "java.util.Date" d