Time calculation problem

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?

Please help
 
M

Michael Bauer [MVP - Outlook]

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

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

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


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
 
B

bear

Hello

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

Please help


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

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

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


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?

Please help
.
Submitted using http://www.outlookforums.co
 
M

Michael Bauer [MVP - Outlook]

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

--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
<http://www.vboffice.net/product.html?pub=6&lang=en>


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?
Please help


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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


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?

Please help
.
Submitted using http://www.outlookforums.com

.
Submitted using http://www.outlookforums.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top