View Full Version : Integer Number using Server Time

01-08-2007, 06:06 PM
Dear All,

I am creating a contact us form and i want at the completition of the form to add a unique number so the customer can contact us.

I am using java and i decide to use the Server Time.
I want to record the day,month,year,hour,minute,msec into 1 number with Java.

Can you help me please?

Best Regards

Philip M
01-08-2007, 07:51 PM
First of all, Javascript (which is what this forum covers) is not at all the same language as Java, in spite of the confusingly similar names.

In JavaScript the date.getTime() method returns the number of milliseconds since midnight on 1st January 1970.

var now = new Date();
var msecs = now.getTime();
alert (msecs); // something like 1168282439440

01-08-2007, 10:51 PM
Thank you very much.I added in this cause i dont find any thread for Java.Sorry if i was wrong.