Results 1 to 5 of 5

Thread: Getting Server Date

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Location
    hyderabad
    Posts
    26

    Getting Server Date

    How do I get the server date.
    When all the code is executed at the server side why doesn't
    date() function retrieve the server date.
    I had given something like this <%dt=date()%> in my code to
    get the server date. so dt has the server date here.
    Lemme know the difference please.


    Thanks in advance...
    bhav
    --------
    Sometimes you are happy quetching
    even when you know there is a solution for it

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    Hi manjeera

    I can't actually remember wether ASP supports the date function in the same way VB uses it, but you can use Now() instead.

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Remember to format it if you don't want the time =)
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    as in dt = FormatDateTime(Now(),vbShortDate)



    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  5. #5
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Everything withing ASP script <% %> is server side. IT means that if you use Date or Now you will always get server's date/time.

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