Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Unix timestamp from a string to date

Hello,

I have problems converting a unix timestamp to date.  Is there a way to convert unix timestamp to date?

Please check the attched file. I get the unix timestamp with right(palnie, 10).Screen Shot 2014-07-02 at 09.42.33.png

1 Solution

Accepted Solutions
MVP
MVP

Re: Unix timestamp from a string to date

Use a preceding load like:

load

      cmd,

      palnie,

      Date(Num(right(palnie,10))/86400+25569) as Date;

load

      cmd,

      subfield(funnel,'|') as palnie;

4 Replies
MVP
MVP

Re: Unix timestamp from a string to date

Try like:

Load

         Date( Num(Right(palnie,10)) /  86400 + 25569) as Date

Not applicable

Re: Unix timestamp from a string to date

The problem is a cannot use 'palnie' in scripting, i guess because it is a variable from string manipulation.

Screen Shot 2014-07-02 at 09.54.02.png

If I use like this:

Screen Shot 2014-07-02 at 09.56.24.png

I get this error:

Screen Shot 2014-07-02 at 09.56.02.png

I've been working on this problem for almost 4 hours.

MVP
MVP

Re: Unix timestamp from a string to date

Use a preceding load like:

load

      cmd,

      palnie,

      Date(Num(right(palnie,10))/86400+25569) as Date;

load

      cmd,

      subfield(funnel,'|') as palnie;

Not applicable

Re: Unix timestamp from a string to date

Wow...that works.

Thank you so much, forever in your debt.