AnsweredAssumed Answered

VB Script to replace strings

Question asked by dmensah2 on Jul 7, 2015
Latest reply on Jul 7, 2015 by rfairhur24

Hello everyone! Very new to the GIS industry, but I'm hoping to learn more down the line. Forgive me if this is a very basic question.


Right now I'm having trouble doing something I think should be very simple. I'm just to replace a string in a field with another string using the Field Calculator. However, every time I run the calculation absolutely nothing appears to happen to the records within the field in question. I am working with ~4,000 records and some of them have unnecessary leading zeroes in them. Normally I would run a calculation that would remove all the leading zeroes but certain records need it while others don't. As a result, I thought it would be easier to just entirely replace the ones that have the unnecessary leading zeroes.


Here is what I'm entering into the Field Calculator



= Replace([DATE_TEXT], "011/12/2014","11/12/2014")


The numbers are both set to strings and I have made sure to check the VB Script parser. I've also tried it using the Python parser:





But with no luck. What am I doing wrong? Is it the settings? I'm working with a standalone shape file in Arc 10.3.