January 31, 200224 yr Greetings -- I'm looking to delete a specific set of charachters from a field in about 2000 records. I've tried writing a script to do this, but can't get it down, can anyone help?? Field is a date field and has "0.00" which I'd like to remove but leave the date before it alone completely, field looks like "01/01/01 0.00" I'm trying the substitute function, but keep getting errors while trying to write it. Any assistance would be a start.
January 31, 200224 yr left(datefield, 8) should work, if the months and the days always have leading zeros. Make the datefield as text field first! Gerd [ January 31, 2002: Message edited by: Gerd Muller ]
January 31, 200224 yr Author unfortunately the date format varies, would there be an easy to account for this??? something like: if char 8 = 2 then Left(datefield,8) else :??
February 1, 200224 yr Sorry what I meant to say above was this: You have used a text field to store date information, that's why you are having so much trouble. Always store date information in date fields because FMP (and you) can work with it so much easier.
February 5, 200224 yr If the field is a text field and the date portion is always followed by 'space plus 0.00', the following should work for different lengths of the date portion; Left (Datefield ,Length (Datefield-5))
February 5, 200224 yr quote: Originally posted by Korky: If the field is a text field and the date portion is always followed by 'space plus 0.00', the following should work for different lengths of the date portion; Left (Datefield ,Length (Datefield-5)) ...or use Substitute(Datefield, " 0.00", "")
Create an account or sign in to comment