MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: String to Number


Steffen:

In[128]:=
ToExpression[{StringTake["06:42",2],StringTake["06:42",-2]}]


Out[128]=
{6, 42}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

<steffenz at server2.fo.FH-Koeln.DE> wrote in message
news:95tq99$m8c at smc.vnet.net...
> Hi
>
> I read a time from a file (this format  06:42) as a string.
>
> I would like to convert this string into to numbers (6 and 42).
>
> any suggestions?
>
> Thanks
>
> Steffen
>
>
> Dipl.-Ing. Steffen Zozgornik
>
> Institut fur Licht- und Bautechnik
> an der Fachhochschule Koeln
> Gremberger Strasse 151 a
> D - 51105 Koeln
>
> Tel.: +49 - 221 - 83 10 95
> Fax.: +49 - 221 - 83 55 13
>
>




  • Prev by Date: Re: Thickness in ParametricPlot3D
  • Next by Date: Re: String to Number
  • Previous by thread: Re: String to Number
  • Next by thread: Re: String to Number