Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3676 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

 

 

Posted

Use GetAsNumber( ).  It will ignore the alphabetic characters, spaces, and punctuation, and will return the value as a single numerical value.

Posted

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?

Posted

... As Comment suggested (assuming your input is in a variable called $text): 

 

Time (GetAsNumber(Left($text;2)); GetAsNumber(Middle($text; 5; 2)) ; 0 ) 

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.