Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Numberlong to date format

Hi,

How to get date from numberlong value in matillion.

Ex : my numberlong value is like (633220416000000000) ...

i'm changing this type of value to date ...

Thanks,

Mathan...

8 Community Answers

Matillion Agent  

Ian Funnell —

Hi Mathan,

The answer will depend on which one of our products you are using.. Matillion ETL for Redshift, for Snowflake or for Google BigQuery. Please could you confirm?

Also, can you indicate where you got the data from? It looks like maybe a millisecond epoch date from a MongoDB Query?

Best regards,
Ian


Mathan Selvaraj —

Hi lan,

I'm Using Matillion ETlL for redshift

And

i'm Using data from mongoDB

Thanks,

Mathan


Matillion Agent  

Ian Funnell —

Hi Mathan,

I think you should be able to use an expression like this inside a Transfrormation job:

DATEADD(millisec, "yourtimestamp" :: BIGINT, TIMESTAMP 'epoch')

Best regards,
Ian


Mathan Selvaraj —

Hi lan,

I have an mismatched year during usage of this query.

Year like : 2171,3265 something like that...

and also

i have a error using my numberlong value,

Error : ur timestamp exeeds the time...

it donotes only 10 digit value..

Thanks,

Mathan.


Matillion Agent  

Laura Malins —

Hi Mathan

Looking at the example number you gave, I don’t think this is a standard Mongodb date, which is milliseconds since epoch. If you can give is details of what the format of the number is, we can help you convert to a date using Matillion.

Thanks
Laura


Mathan Selvaraj —

Hi Laura,

I need a format like "yyyy-mm-dd hh-mm-ss"...

Thanks,

Mathan


Matillion Agent  

Laura Malins —

Hi Mathan

Sorry I didn’t phrase my question very well. What is your number stored as? For example Ian assumed it was milliseconds since epoch, but it doesn’t appear to be the case?

Thanks
Laura


Matillion Agent  

Laura Malins —

Hi Mathan

I’m just following up to see if you managed to find out the format of that source number?

Thanks
Laura

Post Your Community Answer

To add an answer please login