Discussion board where members can get started with QlikView.
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.
Time from DB Desired Data
14.10 2:35 pm
P.S: when I transform the data I'm losing the 0 at the right.
time(time#(TIMEFROMDBFIELD,'hh.mm'),'hh:mm TT') as NEWTIMEFIELD
time#() will parse the data in as time type, time() will format it (again, check out format codes).
Hope this helps,
P.S: What do you mean with "when I transform.. " above, could you post your expression?
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
Time(Time#(trahoi,'hh.mm'),'hh:mm TT') as trahoi1
FROM INMTRA_EXT_Copia.qvd (qvd);
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
Thank you very much!!!
That worked perfect!