Solved

ASP simple time offset

Posted on 2004-10-28
256 Views
Last Modified: 2012-06-27
Hi.

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
0
Question by:Insomniac_PhD
    3 Comments
     
    LVL 95

    Expert Comment

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

    Expert Comment

    by:Lee W, MVP
    0
     
    LVL 95

    Accepted Solution

    by:
    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())) %>
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    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…
    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
    This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…

    875 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now