Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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?
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);
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!