MathGroup Archive 1999

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

Search the Archive

Number Format, Padded Form

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21357] Number Format, Padded Form
  • From: "Charles A. Judge" <kinky at chesapeake.net>
  • Date: Wed, 29 Dec 1999 14:15:44 -0500 (EST)
  • Organization: Posted via Supernews, http://www.supernews.com
  • Sender: owner-wri-mathgroup at wolfram.com

I need to make a table of times in seconds, expressed in the format  min:sec

58
59
1:00
1:01
1:02 etc.

Table[StringForm["``:``", IntegerPart[minsec2/60.],
    PaddedForm[minsec2 - IntegerPart[minsec2/60]*60, {1, 0},
      NumberPadding -> {"0", "0"}]], {minsec2, 56, 146, 2}]

will correctly format the 1:04 1:06 numbers, but adds an extra zero to
numbers above 9 seconds.


0:058

1:010


Any suggestions?


Charles A. Judge





  • Prev by Date: Re: volatility and greek values for financial options
  • Next by Date: re: ReadList Error message:"Tag Times"
  • Previous by thread: Re: volatility and greek values for financial options
  • Next by thread: Re: Number Format, Padded Form