# Value of getTime?

**URL:** <https://forum.kirupa.com/t/value-of-gettime/210891>\
**Category:** Uncategorized\
**Created:** [December 23, 2006, 2:12pm UTC](https://forum.kirupa.com/t/value-of-gettime/210891 "2006-12-23T14:12:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adbul](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@Adbul](https://forum.kirupa.com/u/Adbul)\
**Post date:** [December 23, 2006, 2:12pm UTC](https://forum.kirupa.com/t/value-of-gettime/210891/1 "2006-12-23T14:12:05Z")

</div>

hi i have a function that kinda look like this:  
//////////////////GTA4//////COUNTDOWN////////////////  
onEnterFrame = function () {  
eventDate = new Date(2007, 9, 16);  
eventMsecs = eventDate.getTime();  
currentDate = new Date();  
currentMsecs = currentDate.getTime();  
timeLeft = eventMsecs-currentMsecs;  
//  
timeleft\_txt.text = timeLeft;  
};  
//////////////////////////////////////////////////////////////  
it works but only counts down in msecs though…

But heres the strange thing:  
after the function i put in:

if (timeLeft\<=0) {  
trace (“YEAH”);  
}

or something like that  
AND IT TRACES?  
i try with

if (timeLeft\>=0) {  
trace (“YEAH”);  
}  
AND IT TRACES

so i try

if (timeLeft==0) {  
trace (“YEAH”);  
}

NO TRACE

no trace is also if i try \>  
or \<
