# How to delete numbers from a api code

**URL:** <https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539>\
**Category:** Questions about Thunkable X\
**Created:** [June 12, 2019, 6:04am UTC](https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539 "2019-06-12T06:04:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chew\_da\_bacca](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@Chew\_da\_bacca](https://community.thunkable.com/u/Chew_da_bacca)\
**Post date:** [June 12, 2019, 6:04am UTC](https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539/1 "2019-06-12T06:04:09Z")

</div>

Hi guys  
Is there a way to delete some numbers from an api code? For example, separating a date or year from the code itself?  
Thanks

---

<div class="post-metadata">

**Author:** ![kartik\_old](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/kartik_old/32/28305_2.png) [@kartik\_old](https://community.thunkable.com/u/kartik_old)\
**Post date:** [June 12, 2019, 6:50am UTC](https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539/2 "2019-06-12T06:50:05Z")

</div>

@Chew_da_bacca,  
You may use the **Segment Text** block inside the Text field…  
Hope it helps 😄

---

<div class="post-metadata">

**Author:** ![Chew\_da\_bacca](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@Chew\_da\_bacca](https://community.thunkable.com/u/Chew_da_bacca)\
**Post date:** [June 12, 2019, 7:20am UTC](https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539/3 "2019-06-12T07:20:45Z")

</div>

![45%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/4/74f81673dd4a764c7232e125907b4adcceb386ca.png)

errr may I ask which is that?

---

<div class="post-metadata">

**Author:** ![CBVG](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cbvg/32/32401_2.png) [@CBVG](https://community.thunkable.com/u/CBVG)\
**Post date:** [June 12, 2019, 7:53am UTC](https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539/4 "2019-06-12T07:53:55Z")

</div>

That would be the “get substring from letter#1 to letter#2”.

For instance, suppose you have today’s date in a variable [mystring]=“2019-06-12 Wednesday”, and you want to remove the year and day, you would “in text [mystring] get substring from letter#6 to letter#10”. This will ignore all characters before the 6th, grab from the 6th to the 10th, and ignore everything from the 11th to the end; thus returning “06-12”.

Alternatively, you could strip known sequence using the replace.  
Calling 'in text [mystring] replace all “2019” with “” ’ .  
The “” is a string that contains nothing, not even a blank.  
This would return “-06-12 Wednesday” because the string “2019” would have been replaced by nothing.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:13pm UTC](https://community.thunkable.com/t/how-to-delete-numbers-from-a-api-code/102539/5 "2024-11-08T12:13:32Z")

</div>


