Re: Strings to Integers
- To: mathgroup at smc.vnet.net
- Subject: [mg67614] Re: [mg67566] Strings to Integers
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 2 Jul 2006 06:27:36 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
data = {"12:33", "120:03", "343:59", "1:00"}; ToExpression[StringSplit[#, ":"]& /@ data] {{12, 33}, {120, 3}, {343, 59}, {1, 0}} Bob Hanlon ---- Virgil Stokes <vs at it.uu.se> wrote: > The following is an example of a list that contains times in min:sec, > > {12.33, 120:03, 343:59, 1:00} > > where each element is of String type. > > Is there a "smart" way to convert lists such as this into Integer type > for both minutes and seconds? > > --Thanks, > V. Stokes >