How to delete numbers from a api code

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

1 Like

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

2 Likes

errr may I ask which is that?

1 Like

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.

3 Likes