Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to convert bigint to date ? #23

Open
jiangxy opened this issue Feb 11, 2022 · 1 comment
Open

how to convert bigint to date ? #23

jiangxy opened this issue Feb 11, 2022 · 1 comment

Comments

@jiangxy
Copy link

jiangxy commented Feb 11, 2022

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
Copy link
Collaborator

Lerm commented Nov 21, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants