I have a variable
$t = “4459156205”
I’m trying to split it into 4459 and 156205
So I thought I would try
$t[0…3]to get 4459, but I’m getting
4
4
5
9
How can I get 4459
I have a variable
$t = “4459156205”
So I thought I would try
$t[0…3]to get 4459, but I’m getting
How can I get 4459
You can use the substring method if it’s a string … like this:
“4459156205”.Substring(0,4)
You can also use -join
-join $t[0..3]
Thank you