Re: subtract hours
- From: "Duane Hookom" <duanehookom@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 15 Jun 2005 21:40:40 -0500
You would need to convert the text to a date. If your values were all less
than "24:00" then you could use CDate() or TimeValue(). Values greater than
23:59:59 would require a custom function or fancy expression.
--
Duane Hookom
MS Access MVP
"Wez.k" <Wezk@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9B3E484E-EC0A-4F6E-A28B-9B9DE4C10D9D@xxxxxxxxxxxxxxxx
> Text fields - is that the problem?
>
> "Duane Hookom" wrote:
>
>> Do you have date/time fields or are you attempting to do this with text
>> fields. Since you stated "26:00" I should have suspected text.
>>
>> --
>> Duane Hookom
>> MS Access MVP
>> --
>>
>> "Wez.k" <Wezk@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:2D55DDC0-23C2-424D-A103-D1068C3C2C33@xxxxxxxxxxxxxxxx
>> >I keep getting a Type Mismatch error
>> >
>> > "Duane Hookom" wrote:
>> >
>> >> That's basically what happens. Why do you think you aren't getting
>> >> correct
>> >> results? Do you have an example?
>> >>
>> >> Doug Steele has a nice function at
>> >> http://www.accessmvp.com/djsteele/Diff2Dates.html.
>> >>
>> >> --
>> >> Duane Hookom
>> >> MS Access MVP
>> >> --
>> >>
>> >> "Wez.k" <Wezk@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >> news:37E317E7-BD77-4206-A518-B1106AA59E64@xxxxxxxxxxxxxxxx
>> >> > Hello
>> >> > Could anyone tell me a simple way to subtract two times to give the
>> >> > difference, i.e. subtract 22:40 from 26:00 to get 03:20.
>> >> > The values are held in text boxes on a report.
>> >> >
>> >> > Thanks
>> >>
>> >>
>> >>
>>
>>
>>
.
- References:
- subtract hours
- From: Wez.k
- Re: subtract hours
- From: Duane Hookom
- Re: subtract hours
- From: Wez.k
- Re: subtract hours
- From: Duane Hookom
- Re: subtract hours
- From: Wez.k
- subtract hours
- Prev by Date: Re: Missing Infor.
- Next by Date: Re: Text box not showing appopriate information
- Previous by thread: Re: subtract hours
- Next by thread: IIF euestion once more
- Index(es):
Relevant Pages
|