Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

Date/Time: How to handle midnight in calculations

Author(s)
Robin Stoddard-Stones

  If you want to include midnight in your calculation then an easy way is to include a midnight operator (1).

    Thus #23.45# -1 = 00:15:00

    f you need to go over midnight then you need to include the operator (and format the result to understand it)

        #23:45# - 1-#00.15# = -2.08333333333333E-02

    but

        format(#23:45#-1-#00:15#,"short time") = 00:30

    and

        format(-2.08333333333333E-02, "short time")= 00:30"


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer