How do I store a time value in a variable.

Hello I want to display the time that the player took to complete a level. I am currently using

winText.text = "You Won in "+Time.time+“seconds”;

but the time value is not constant. How do I store the time at the instant when this code was initialized?

You might want to take a look at this:
http://unity3d.com/support/documentation/ScriptReference/Time.html
here’s an example:

var levelTimer : float;
var updateTimer : boolean;
 
function Start()
{
   levelTimer = 0.0f;
}
 
function Update()
{
   if (updateTimer)
      levelTimer += Time.deltaTime;
}
 
function LevelEnded()
{
   updateTimer = false;
}