keydash Posted October 29, 2014 Posted October 29, 2014 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
Matthew F Posted October 29, 2014 Posted October 29, 2014 Use GetAsNumber( ). It will ignore the alphabetic characters, spaces, and punctuation, and will return the value as a single numerical value.
comment Posted October 29, 2014 Posted October 29, 2014 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?
Matthew F Posted October 29, 2014 Posted October 29, 2014 ... As Comment suggested (assuming your input is in a variable called $text): Time (GetAsNumber(Left($text;2)); GetAsNumber(Middle($text; 5; 2)) ; 0 )
keydash Posted October 29, 2014 Author Posted October 29, 2014 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.
Recommended Posts
This topic is 3676 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now