Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


ASP simple time offset

Posted on 2004-10-28
Medium Priority
Last Modified: 2012-06-27

I have the time offset stored in a variable like +3 or -2
I am dsiplaying the server time with time() like Server Time:5:15:18 PM    
How can I display the offset time like   Your Time:8:15:18 PM  

I am thinking something like <%=time(variableoffsettime)%>

??? Not sure how it goes..

:) Thanks
Question by:Insomniac_PhD
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 96

Expert Comment

by:Lee W, MVP
ID: 12440137
DateAdd('h',variableoffsettime,time) - I'll double check that and post the link for the DateAdd function
LVL 96

Expert Comment

by:Lee W, MVP
ID: 12440148
LVL 96

Accepted Solution

Lee W, MVP earned 1000 total points
ID: 12440157
Assuming your variable is "variableoffsettime" and you wanted to display the current date/time with that variable factored in, I'd do it this way:

<% TimeValue(dateadd("h", variableoffsettime, Now())) %>

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question