Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

mp802377
Contributor

Convert number .0000150462962962963 to Time - coming from SAS

Hello,

How do I convert date with numbers like .0000150462962962963 to Time - coming from SAS? In the data set from SAS I set it to time, but it still pulls into Qlikview as a number. I have tried several formats and none are working.

  timestamp(Timestamp(Hour, 'HH:MM:SS TT'),'HH:MM ') as time,

     Interval(Time(Hour, '0123456789.')/1440, 'h:mm:ss') as NewTime,

      Interval(Date(Hour, '0123456789.')/1440, 'h:mm:ss') as NewTime2,

Another example of an hour in decimal is 1.15740740740741E-05

When I run it in SAS Enterprise Guide it is in hh:mm format.

Thank you,

Martha

2 Replies

Re: Convert number .0000150462962962963 to Time - coming from SAS

What time does this corresponds to?

.0000150462962962963

mp802377
Contributor

Re: Convert number .0000150462962962963 to Time - coming from SAS

I found out that it was actually in seconds. So in the Select from SAS, I put in:

Second(hour) AS Hour, and that solved that.

.00010416666667 is actually 0:00:09 in SAS

Thank you so much for saying that! If I thought to compare, I might have figured out it was in seconds.

Martha