# Function to determine which date is older and newer?

**URL:** https://forum.kirupa.com/t/function-to-determine-which-date-is-older-and-newer/271006
**Category:** Uncategorized
**Created:** [September 17, 2008, 11:26am UTC](https://forum.kirupa.com/t/function-to-determine-which-date-is-older-and-newer/271006 "2008-09-17T11:26:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![deluxmilkman](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@deluxmilkman](https://forum.kirupa.com/u/deluxmilkman)
#### Post date: [September 17, 2008, 11:26am UTC](https://forum.kirupa.com/t/function-to-determine-which-date-is-older-and-newer/271006/1 "2008-09-17T11:26:49Z")

</div>

I would like to get the current time from user`s computer, and compare that time with another time I pre-decided, and know if user`s time is newer than the my pre-decided time.

I used

```auto

var now:Date = new Date();
txtField.text = now.toString();

```

to Get “Wed Sep 17 17:42:46 GMT+0900 2008”

should I convert this to milliseconds?  
I don`t know what to do next.  
please help me.

thank you
