tags:

views:

30

answers:

2

Hello guys My question is more about logic not code.I created something called prepared messages with time i supply to each new message, i compare the time with current time and give each row a background. Is it possible for me to fetch the time with javascript only the current time NO DATE. Regards

+1  A: 

Yes, see Date.getTime()

Ben
That will return the number of milliseconds since 01 January, 1970 UTC
CMS
A: 

Take a look at the Date Object and in particular the following methods

  1. toTimeString()
  2. getHours()
  3. getMinutes()
  4. getSeconds()
Gaby