cancel
Showing results for 
Search instead for 
Did you mean: 

Unix Date format to Normal date format

ykoppisetty
New Contributor II

Please help me to convert this below UNIX date format to regular date format,

1445910469510

1 ACCEPTED SOLUTION

j_angelevski
Contributor III

@ykoppisetty

It is because the parse method expects a number but you are providing a string value.
You need to parse the “Modified_Date”, you can do so by using parseInt(string).

In your case would be:

parseInt($Modified_Date)

And the full expression to format the date would be:

Date.parse(parseInt($Modified_Date))

View solution in original post

7 REPLIES 7

j_angelevski
Contributor III

@ykoppisetty

If that is the field you have in the input document, then you can simply use:

Date.parse($Modified_Date)

j_angelevski
Contributor III

@ykoppisetty

It is because the parse method expects a number but you are providing a string value.
You need to parse the “Modified_Date”, you can do so by using parseInt(string).

In your case would be:

parseInt($Modified_Date)

And the full expression to format the date would be:

Date.parse(parseInt($Modified_Date))

ykoppisetty
New Contributor II

Thank You @j.angelevski, @shashish.jha for helping me on this use case.