Date/Time Calculation

Results 1 to 2 of 2

Thread: Date/Time Calculation

  1. #1
    Join Date
    Dec 1969
    Posts
    118

    Default Date/Time Calculation

    I would like to post the current date and time for my organization&#039s web site based on CST (located in Indiana). However, the hosting service we use is on PST (2 hours behind, located in California). Can anyone please tell me how to display the CST date/time when the server is 2 hours behind? Thanks!

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Date/Time Calculation

    You use a function called DateAdd.<BR><BR>Dim currentDateTime<BR>currentDateTime = Now<BR><BR>Dim twoHoursEarlier<BR>twoHoursEarlier = DateAdd("h",-2,currentDateTime)<BR><BR>See:<BR>http://www.4guysfromrolla.com/webtech/faq/Intermediate/faq3.shtml<BR>http://www.4guysfromrolla.com/webtech/110398-1.shtml<BR>http://help.activeserverpages.com/iishelp/VBScript/htm/vbs90.htm<BR><BR>for more information

Posting Permissions

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