 | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Date & Time difference Hi All,
I am trying to find a formula that I can use in Access to give the time Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/10362-date-and-time-difference.htmlReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
difference in Hours.
I have the following fields:
[StartDate] , [StartTime] , [EndDate] , [EndTime]
I want to find a formula that will provide a difference in time using
the above fields. But I also need to look between the hours of 09:00am
to 5:30pm.
Does anything exist that can cover this?
I can do this using Crystal reports however I am really struggling with
Access.
Many Thanks
Adam Do you agree or disagree with the writer above? Why not share your immediate thoughts with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | RE: Date & Time difference Check help on the function DateDiff, it can give the difference between two
date/time.
--
Good Luck Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
BS"D
"Adam@nospam.com" wrote:
> Hi All,
>
> I am trying to find a formula that I can use in Access to give the time
> difference in Hours.
>
> I have the following fields: Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
>
> [StartDate] , [StartTime] , [EndDate] , [EndTime]
>
> I want to find a formula that will provide a difference in time using
> the above fields. But I also need to look between the hours of 09:00am
> to 5:30pm.
>
> Does anything exist that can cover this?
>
> I can do this using Crystal reports however I am really struggling with
> Access.
>
>
> Many Thanks
>
> Adam
>
> | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference That does not consider the working hours part of my question.
All DateDiff does is provide the difference between the dates in Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
various formats.
How do I get it to only count when between the hours of 09:00am
to 5:30pm? | 
28-Jul-2006, 08:12 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference In houres
?DateDiff("h",#09:00am#,#5:30pm#)
8
In Minutes
?DateDiff("n",#09:00am#,#5:30pm#)
510
--
Good Luck
BS"D Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
"Adam@nospam.com" wrote:
> That does not consider the working hours part of my question.
>
> All DateDiff does is provide the difference between the dates in Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
> various formats.
>
> How do I get it to only count when between the hours of 09:00am
> to 5:30pm?
>
> | 
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference Thats awesome, thank you! | 
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference Actually, this doesnt solve the problem.
This merely counts the time difference between 09:00 and 5:30, this
doesn't answer my original question. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362 | 
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference What do you expect to get from the difference between 09:00 and 5:30?
--
Good Luck
BS"D
"Adam@nospam.com" wrote:
> Actually, this doesnt solve the problem.
>
> This merely counts the time difference between 09:00 and 5:30, this
> doesn't answer my original question.
>
>Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362 | 
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference Well I've got a start date and start time, which I need to work out the
hourly time difference from the end date and end time.
By putting DateDiff("h",#09:00#,#5:30#) it is merely counting the
difference between 09.00 and 5.30, not my start date and time vs. my Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
end date and time.
Ofer Cohen wrote:
> What do you expect to get from the difference between 09:00 and 5:30?
>
> --
> Good Luck
> BS"D
>
>
> "Adam@nospam.com" wrote:
>
> > Actually, this doesnt solve the problem.
> >
> > This merely counts the time difference between 09:00 and 5:30, this
> > doesn't answer my original question.
> >
> > | 
28-Jul-2006, 08:13 AM
|  | Guest | | | | | | | | | | Re: Date & Time difference Adam@nospam.com wrote:
> Well I've got a start date and start time, which I need to work out
> the hourly time difference from the end date and end time.
>
> By putting DateDiff("h",#09:00#,#5:30#) it is merely counting the
> difference between 09.00 and 5.30, not my start date and time vs. my Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
> end date and time.
So substitute your full start date and end date where the epxression currenlty
has #09:00# and #5:30#.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to... Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=10362
RBrandt at Hunter dot com | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |