Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Converting number to Text

Hi

I have a field called Time which is a numerical field.  If the time is 13:45:52 then the value will be 134552.  However, if the time is 00:03:24 then the value in the field is 324.  I would like it to show 000324 so that I can then use the maketime function to convert it back into a real time format.

So how can I convert the number 324 into text '000324' in the load script? Or is there another way to convert 324 into a time?

Thanks

A.

1 Solution

Accepted Solutions
sunny_talwar

Can you try this:

Num(TimeFieldName, '000000') as TimeFieldName

Sample script:

Table:

LOAD Time(Time#(Num(TimeFieldName, '000000'), 'hhmmss')) as TimeFieldNew,

  TimeFieldName;

LOAD * Inline [

TimeFieldName

324

134552

];

Capture.PNG

View solution in original post

2 Replies
sunny_talwar

Can you try this:

Num(TimeFieldName, '000000') as TimeFieldName

Sample script:

Table:

LOAD Time(Time#(Num(TimeFieldName, '000000'), 'hhmmss')) as TimeFieldNew,

  TimeFieldName;

LOAD * Inline [

TimeFieldName

324

134552

];

Capture.PNG

Not applicable
Author

Hi Adrian,

Can you please try using the below script

load time,

     replace(time,':','') as one_way;

load * inline [

time

13:45:52

00:03:24

];

Thanks,

Sreeman