how to get 0.1 second?

Discussion in 'C#' started by wacamoi, Mar 8, 2009.

  1. #1
    usually we can get time by using <% =now %> 3/8/2009 7:23:53

    is it possible get less than 1 second?
    like
    3/8/2009 7:23:53:20

    thanks

    regards,
     
    wacamoi, Mar 8, 2009 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Now.Millisecond will get 1 thousandth of that second, that's if your using asp.net, i'm not sure about Classic ASP.
    Or to get the complete string:
    Format(Now, "hh:mm:ss.ff")
     
    camjohnson95, Mar 8, 2009 IP
  3. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #3
    If you are using server side javascript then you can use getMilliseconds function to get the milliseconds.
     
    MayurGondaliya, Mar 8, 2009 IP
    wacamoi likes this.
  4. bprashanth.gi

    bprashanth.gi Active Member

    Messages:
    55
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    93
    #4
    Code goes something like this...

     
    bprashanth.gi, Mar 10, 2009 IP
    wacamoi likes this.
  5. wacamoi

    wacamoi Peon

    Messages:
    810
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks but need in Classic ASP

    or save SQL DB from Java
     
    wacamoi, Mar 13, 2009 IP
  6. alexpr07

    alexpr07 Active Member

    Messages:
    284
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    73
    #6
    You can use Timer function to get milliseconds; for example if you need to clock how much time elapsed...
     
    alexpr07, Mar 15, 2009 IP
    wacamoi likes this.
  7. RoyalFlushed

    RoyalFlushed Peon

    Messages:
    34
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I believe this isn't possible in classic ASP. You could do with with SQL tough!

    therefore u can use the following query :

    Select DATEPART (ms, getdate())

    Good luck!
     
    RoyalFlushed, Mar 18, 2009 IP
    wacamoi likes this.