# How can i remove characters from a list?

**URL:** <https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320>\
**Category:** Issues / Bugs\
**Created:** [June 24, 2024, 3:37pm UTC](https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320 "2024-06-24T15:37:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [June 24, 2024, 3:37pm UTC](https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320/1 "2024-06-24T15:37:27Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/9/692b32aae1fe1642dd1ac64dc212a9993772ada5.png)  
Hi all…  
This code block gives this result  
 ![Screenshot 2024-06-24 at 17.31.40](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/d/6debdbb965fa67604adc432abe56ac194d5c6aa2.jpeg)

As you can see there are mentioned time in this image hh:mm:ss

I simply want to remove all last three characters for both  
“Planerad avgång” and “Estimerad avgång”

Instead of 17:19:56 i want to show 17:19 (hh:mm) for all departures comming up (This image show only 1…

Can someone advice?

---

<div class="post-metadata">

**Author:** ![marion.dorsett](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/marion.dorsett/32/175129_2.png) [@marion.dorsett](https://community.thunkable.com/u/marion.dorsett)\
**Post date:** [June 24, 2024, 4:07pm UTC](https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320/2 "2024-06-24T16:07:32Z")

</div>

Because you’re working with a time string that’s formatted as hh:ii:ss, the characters are fixed. All you need to do in this case is get the substring from character 1 to character 5.

 ![remove-chars-00](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f6239bb686c36ac85e5641f4200432a24665d60c.png)

---

<div class="post-metadata">

**Author:** ![marion.dorsett](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/marion.dorsett/32/175129_2.png) [@marion.dorsett](https://community.thunkable.com/u/marion.dorsett)\
**Post date:** [June 24, 2024, 4:15pm UTC](https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320/3 "2024-06-24T16:15:15Z")

</div>

… and thinking about it more, if your string isn’t consistent, you could create a list based on the “:” as a delimiter. Then extract the parts from the newly created list, and join them back together.

 ![remove-chars-01](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/7/176c6ecee3fa246de9df5c4838bc6653e6c0173a.png)

Either way should work, the second option my be better practice.

---

<div class="post-metadata">

**Author:** ![stefansladdeneng1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/stefansladdeneng1/32/170123_2.png) [@stefansladdeneng1](https://community.thunkable.com/u/stefansladdeneng1)\
**Post date:** [June 24, 2024, 9:19pm UTC](https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320/4 "2024-06-24T21:19:15Z")

</div>

Hmmm - Thanks for trying. As you can see from the creation of the list item it is the actual list item that contains two separate time sequences. So i probably need this to happen before it goes into the list. Do you have any more suggestions? Or someone else?

---

<div class="post-metadata">

**Author:** ![marion.dorsett](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/marion.dorsett/32/175129_2.png) [@marion.dorsett](https://community.thunkable.com/u/marion.dorsett)\
**Post date:** [June 24, 2024, 9:59pm UTC](https://community.thunkable.com/t/how-can-i-remove-characters-from-a-list/3072320/5 "2024-06-24T21:59:13Z")

</div>

Setup temp vars at the start of your loop to create the lists for the time strings you want to manipulate, and you’re good.

 ![remove-chars-02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/f/3f1e6ab3eee3132643bfe33e688e4c66b58dcbd4.png)
