How rest one minute at time

Posted on 2005-04-14
Last Modified: 2012-05-05
I have a problem with rest one minute at my time for exaple:

dim date1 as date

private sub button_click
date1 = "6:00:00 a.m."

text1.Text = date1- CDate("00:01:00 a.m.")
end sub

and i want to obtain in my text box 5:59:00 p.m.
Question by:Vellenaweth
    1 Comment
    LVL 85

    Accepted Solution

    Dim date1 As Date

    Private Sub button_click()
        date1 = #6:00:00 AM#
        Text1.Text = DateAdd("n", -1, date1)
    End Sub

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    733 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

    21 Experts available now in Live!

    Get 1:1 Help Now