Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Integer Number using Server Time

    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
    Nick.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,308
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    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.

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

  • #3
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you very much.I added in this cause i dont find any thread for Java.Sorry if i was wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •