Strip Value To Left Of Character
I have a database field with some values of x/. As an example 3/3.99. I am looking for a VB script to strip out the 3/ leaving me 3.99.
i.e. 2/5.99 I want 5.99. I was hoping to somehow remove everything to the left of the / including the /.
Any ideas?
-
Shotaro Ito
★ BarTender Hero ★
For BarTender 10.0 or later, that's easy..
on the data source's Transforms tab > search and replace, add 2 actions.1. Search and Delete Everything Before: "/"
2. Search and Delete: "/"
For older versions, you need OnProcessData VB script in More options of the data source.
'Find "/" and delete the "/" and text before' i = Instr(Value,"/") if i >= 1 Then Value = Mid(Value, i+1) End If
0 -
You could even simplify it down further:
value = mid(value,instr(value,"/") + 1)
0 -
Thanks for the script. I couldn't use the transforms tab because I don't want it to do that always, it is based on some other field values.
The script Mike gave me worked for my use!
Thanks again
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare