Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Clock

Hello,

I'm trying to insert the date into my project. But I was wondering how can I add the system information (mm/dd/yyyy) or the IP information.

Thank you very much.

14 Replies
Anonymous
Not applicable
Author

Ok, I've done that and works great.

Now I want to transform an time data that's given as a decimal, how can I transform it from the script into a time format.

i.e:

Time from DB          Desired Data

9.00                        9:00

10.35                      10:35

14.10                       2:35 pm

P.S: when I transform the data I'm losing the 0 at the right.

Thank you.

swuehl
MVP
MVP

Try using

LOAD

...

time(time#(TIMEFROMDBFIELD,'hh.mm'),'hh:mm TT') as NEWTIMEFIELD

...

FROM ...

time#() will parse the data in as time type, time() will format it (again, check out format codes).

Hope this helps,

Stefan

P.S: What do you mean with "when I transform.. " above, could you post your expression?

Anonymous
Not applicable
Author

What I mean is that when I'm loading the data, its format comes like I wrote (1.42... 14.35... 6.00).

I've done that that you suggested and it went right. Now all the hours that are o'clock... like 6.00, the script erase the zeros affecting the format transformation.

Here is the load and an image of the result

A01:

LOAD

     tradoc,

     trahoi,

     Time(Time#(trahoi,'hh.mm'),'hh:mm TT') as trahoi1

FROM INMTRA_EXT_Copia.qvd (qvd);img.png

swuehl
MVP
MVP

Please try to format the read in numbers with fixed number of decimal places:

time(time#(num(TIMEFROMDBFIELD,'00.00'),'hh.mm'),'hh:mm TT') as NEWTIMEFIELD

Anonymous
Not applicable
Author

Thank you very much!!!

That worked perfect!