# Time calculation problem

Status
Not open for further replies.
B

#### bear

One field with time is being deducted from another field with time:

I have 3 fields in a custom form:

Start1

End2

Difference

Difference field has a formula: [End2] -[Start1]

Problem:

As long as time in field End2 and Start1 are not 12:00-12:59 am or pm formula work fine so 2pm-12pm = 2 hours

If I have 12:59 pm - 12:00 pm outcome is 12:59?

See if the DateDiff function is available in a formular field, for instance:

= DateDiff("h", [end2], [start1])

Best regards

Michael Bauer

Am Fri, 30 Oct 2009 12:15:48 -0400 schrieb bear:

> One field with time is being deducted from another field with time:

> I have 3 fields in a custom form:

> Start1
> End2
> Difference

> Difference field has a formula: [End2] -[Start1]

> Problem:

> As long as time in field End2 and Start1 are not 12:00-12:59 am or pm

formula work fine so 2pm-12pm = 2 hours

> If I have 12:59 pm - 12:00 pm outcome is 12:59?

> .
>

Hello

Tried DateDiff("h", [end2], [start1]). Did not work, it is constantly shows 5:00 regardless of what is in end2 and start1?

mb wrote on Tue, 03 November 2009 15:19
> See if the DateDiff function is available in a formular field, for instance:

> = DateDiff("h", [end2], [start1])

> > Best regards
> Michael Bauer

> > >

> Am Fri, 30 Oct 2009 12:15:48 -0400 schrieb bear:
>
> > One field with time is being deducted from another field with time:
> > I have 3 fields in a custom form:
> > Start1
> > End2
> > Difference
> > Difference field has a formula: [End2] -[Start1]
> > Problem:
> > As long as time in field End2 and Start1 are not 12:00-12:59 am or pm

> formula work fine so 2pm-12pm = 2 hours
> > If I have 12:59 pm - 12:00 pm outcome is 12:59?
> > .
> >

With Debug.Print you can print the values of end2 and start1 (ctrl+g). I

doubt they really change.

Best regards

Michael Bauer

Am Thu, 17 Dec 2009 18:14:09 -0500 schrieb bear:

> Hello

> Tried DateDiff("h", [end2], [start1]). Did not work, it is constantly

shows 5:00 regardless of what is in end2 and start1?

> mb wrote on Tue, 03 November 2009 15:19
> > See if the DateDiff function is available in a formular field, for

instance:
>

>> = DateDiff("h", [end2], [start1])
>

>> > > Best regards
> > Michael Bauer
>

>> >> >>

>

>
>> Am Fri, 30 Oct 2009 12:15:48 -0400 schrieb bear:
> >
> >> One field with time is being deducted from another field with time:
> >
>>> I have 3 fields in a custom form:
> >
>>> Start1
> >> End2
> >> Difference
> >
>>> Difference field has a formula: [End2] -[Start1]
> >
>>> Problem:
> >
>>> As long as time in field End2 and Start1 are not 12:00-12:59 am or pm

> > formula work fine so 2pm-12pm = 2 hours
> >
>>> If I have 12:59 pm - 12:00 pm outcome is 12:59?
> >
> >> .
> >>

> .
>

Status
Not open for further replies.
Thread starter Title Forum Replies Date
S Perform calculation in task fields Outlook VBA and Custom Forms 1
Online Mode to Cached Exchange Mode problem Using Outlook 2
Problem Accessing .MSG Property 'ImageNaturalHeight' Tag '0x80010003' Outlook VBA and Custom Forms 1
Problem when requesting to view an email in a browser Using Outlook 0
Outlook 2021 Having problem setting up outlook 2021 with windows 11. I have 3 gmail accounts and I want the 3 gmail, emails to merge into the same outlook input. Using Outlook.com accounts in Outlook 0
Is anyone else having problem conneccting to gmail? Using Outlook 27
Outlook calendar and contacts sync problem-outlook disconnects Using Outlook.com accounts in Outlook 2
Archiving and Likely Modified Date Problem Using Outlook 3
Problem moving file “Email folders.pst” to new PC Using Outlook 5
Problem Checking the available stores in my Inbox (Outlook VBA) Outlook VBA and Custom Forms 0
GetAssignedView Problem Outlook VBA and Custom Forms 2
Outlook 2010 Problem with OutLook 2010 32 bit, after Windows Auto Update Using Outlook 3
Outlook 2016 Font Problem Using Outlook 5
I have met my waterloo trying to resolve embedded graphics problem with outlook 2007 and now 2016 Using Outlook 1
Problem with custom form including _DocSiteControl1 Outlook VBA and Custom Forms 0
Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 4
Outlook 2007 Calendar instant search problem. Windows 7 Using Outlook 0
Sort Problem with Sent Folders Using Outlook 1
Conditional formatting problem with "is not empty" and categories Using Outlook 2
The upload of "Calendar" failed. There was a problem with the request. Using Outlook 6
Import csv problem Using Outlook 7
Outlook 2013 Ost to pst conversion problem Using Outlook 1
The problem with a fairly large file. Using Outlook 3
Outlook 2013 Send problem - 'Not Responding' forever Using Outlook.com accounts in Outlook 10
Help to understand the problem of work Using Outlook 1
Outlook 2016 search problem persists after applying all known solutions Using Outlook 12
problem with convert Using Outlook 1
SendFromAccount - Problem trying to test existing value in open email Outlook VBA and Custom Forms 2
unexpected problem in outlook Using Outlook 1
Outlook 2003 problem with Windows 10 Creators Update 1709 Using Outlook 0
Windows Update Causes BCM Database Access Problem? BCM (Business Contact Manager) 4
problem with conversion ost to pst Using Outlook 2
Problem with searching public folders Exchange 2013/16 Exchange Server Administration 2
Problem with Outlook 2016 new mail tray icon alert (envelope in the systems tray) Using Outlook.com accounts in Outlook 0
Problem running Command button code Outlook VBA and Custom Forms 2
.ost file problem Using Outlook 4
PROBLEM REGARDING OUTLOOK STORAGE LANGUAGES Using Outlook 4
Odd Folder View Problem Using Outlook 3
iCloud problem Using Outlook 9
Reply Problem with Outlook.com account Using Outlook.com accounts in Outlook 0
Problem with Outlook 2007 & iCloud / duplicate tasks Using Outlook 1
Problem moving folders Using Outlook 4
Problem tracking meeting responses Using Outlook 3
Problem subscribing to shared calendar Using Outlook 1
Problem with FreeBusy (before 1pm only) Outlook VBA and Custom Forms 7
Advanced recurrence problem Using Outlook 2
RSS export as OPML problem Using Outlook 4
outlook 2013 contact list problem Using Outlook 0