# Getting seconds

**URL:** <https://forum.kirupa.com/t/getting-seconds/22600>\
**Category:** Uncategorized\
**Created:** [June 5, 2003, 11:24pm UTC](https://forum.kirupa.com/t/getting-seconds/22600 "2003-06-05T23:24:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paisley](https://avatars.discourse-cdn.com/v4/letter/p/a88e57/32.png) [@paisley](https://forum.kirupa.com/u/paisley)\
**Post date:** [June 5, 2003, 11:24pm UTC](https://forum.kirupa.com/t/getting-seconds/22600/1 "2003-06-05T23:24:52Z")

</div>

This is my code:

onClipEvent(load) {  
test = new Date();  
}  
onClipEvent(enterFrame) {  
nSeconds = test.getSeconds();  
trace(nSeconds);  
}

But the output is always the same number the whole time. Is there anything wrong with my code?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 11:31pm UTC](https://forum.kirupa.com/t/getting-seconds/22600/2 "2003-06-05T23:31:16Z")

</div>

Move test = new Date(); into the enterFrame instead of the load 🙂
