October 29, 201411 yr Hello All, This is probably one of those easy ones that I cannot get past. I have imported time data in the form of "01h:09m". I need to parse the two digit hours into one field and minutes into another. I can isolate the right three values, in this case "09m" but how do I remove the "m". Thanks Al
October 29, 201411 yr Use GetAsNumber( ). It will ignore the alphabetic characters, spaces, and punctuation, and will return the value as a single numerical value.
October 29, 201411 yr I can isolate the right three values, in this case "09m" but how do I remove the "m".= Why don't you isolate the middle 2 characters, starting at the 5th character, instead? Then you won't have this problem. need to parse the two digit hours into one field and minutes into another. Is there a reason you can't use a single Time field for both?
October 29, 201411 yr ... As Comment suggested (assuming your input is in a variable called $text): Time (GetAsNumber(Left($text;2)); GetAsNumber(Middle($text; 5; 2)) ; 0 )
October 29, 201411 yr Author Yes, thank you both. I tried both to see which would better meet my needs. Thank you Matthew for setting up Comments suggestion, this is exactly what I needed.
Create an account or sign in to comment