Reputation: 83
I have time for example I have in records time written in this way: 00:02:24
or 15:22:45
, and now I want to make another column (hours), where can be values for example for time 02:43:22
is value 2, or for time 23:22:14
, is value 23 and so on. But I don't know how can I do that, I tried number range, but unsuccessfully.
Here is a picture, how i want to be:
Thanks.
Upvotes: 0
Views: 135
Reputation: 6356
You can use the Modified JavaScript Value step.
I do not know which type is your Time.
var Hour = Time.substr(0,2);
will do.var Hour = Time.getHour();
.To do this:
Modified JavaScript Value
and link it to the data flow provider (in the example a Data grid
).Transformation Function
in the left menu gives you the list of available function additional to the Javascript built-in collection).Get variable
button, keep the variable you need (here Hour), and define/redefine its type (here String).Hour = Hour+''
to force a type conversion into a String.Upvotes: 1