Results 1 to 3 of 3

Thread: Time: VB vs JS

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Arlington, TX
    Posts
    1

    Post

    It doesn't get much more 'beginner' than me, but I managed to crank out a metric clock in javascript. Now I'm trying to make it an actual application with VB6, but I dunno how to get the time expressed as a number of time units since a certain time. In javascript it's easy to get the number of milliseconds since 00:00:00 Jan1 1970, and that made my life easy. Can something like this be done in VB so that it can be converted to metric measurements? Much appreciated.

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    Post

    You can use the Now() function to return the current system time. Look this up in the online help for more info. Also, Timer() may be useful, as it returns the number of seconds since midnight.


    ------------------
    John Percival
    Editor, VB-World.net
    [email protected]



  3. #3
    Addicted Member
    Join Date
    Feb 2000
    Posts
    224

    Post

    Try and use the function

    DateDiff

    ----------------------------------------

Posting Permissions

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



Click Here to Expand Forum to Full Width