Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
haneeshmarella
Creator II
Creator II

Fill required empty spaces before a string with 0

Hi people,

SS.PNG

The original time string showing up is in a string format. The left column showing up 'Original Time String' has 108, 236, 4456, 34523 which as the last 3,4,5 digits of the time format hhmmss which is also string. How can I get them in the desired time string of hhmmss where the blanks are filled with 0's to meet the hhmmss format.

For clear understanding, Ex. 108 means 00:01:08 which is 12:01:08 AM.

Please help.

1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

Try =Num([Original Time Strin],'000000')

View solution in original post

6 Replies
jwjackso
Specialist III
Specialist III

Try =Num([Original Time Strin],'000000')

vishsaggi
Champion III
Champion III

Try this?

TimeChar:

LOAD *, Repeat(0, 6-Len(OrigTimeStr))&OrigTimeStr AS Len INLINE [

OrigTimeStr

108

236

4436

34523

];

shiveshsingh
Master
Master

Try Num function

Num(Field,'000000')

haneeshmarella
Creator II
Creator II
Author

Awesome. Thank you Jerry.

haneeshmarella
Creator II
Creator II
Author

The below  one worked, Nagaraju. Thank you for your response.


Num([Original Time Strin],'000000')

haneeshmarella
Creator II
Creator II
Author

Thank you.