Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2001

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

Search the Archive

Re: Converting from string to integer and back

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29057] Re: [mg29030] Converting from string to integer and back
  • From: "Sherman Reed" <sherman.reed at worldnet.att.net>
  • Date: Sat, 26 May 2001 21:53:50 -0400 (EDT)
  • References: <200105250548.BAA07885@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Brian,

try ToString to convert to string
then
StringTake chopped the string in cent, mon, day,

Sherman C. Reed
sherman.reed at att.net
----- Original Message ----- 
From: "brian" <polar at cloud9.net>
To: mathgroup at smc.vnet.net
Subject: [mg29057] [mg29030] Converting from string to integer and back


> Is there an easy way to convert an integer to a string and then back to
> an integer?  I have a file containing dates in the YYYYMMDD format.  I
> want to convert these dates to {YYYY, MM, DD} so that I can some of the
> functions in the misc`Calendar package.  But at this point I am lost as
> to how to split the date into year,month, day.  StringTake is the only
> way I could think of but doesn't work as the head of the date is
> integer.  If there was a way to convert the date to a string I can split
> the date and then convert this back to an integer but I have seen no
> treatment of anything like this in the books I have.  I guess I'm a
> little more used to handling text in perl.  Any help while I'm riding up
> the learning curve is greatly appreciated.
> 
> Brian Meehan
> 
> 
> 



  • Prev by Date: Re: Converting from string to integer and back
  • Next by Date: Re: Plot[f[x], {x,a,b}] Not Reaching End Points
  • Previous by thread: Converting from string to integer and back
  • Next by thread: Re: Converting from string to integer and back