always show 2 decimal places

G

Guest

A client has this expression on a report:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start time])) &
":" & Minute(Sum([End Time]-[Start Time]))
It gives the total number of hours. This works he would always like it to
display 2 decimal places. For example, if the total is 11 hours even, he
would like it to display 11.00.
 
G

Guest

We tried typing your suggestion in the format property but no change. Did not
see that as an option in the drop-down of formats
--
maryj


Wayne Morgan said:
Try setting the Format property of the textbox to

#.00

--
Wayne Morgan
MS Access MVP


maryj said:
A client has this expression on a report:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start time]))
&
":" & Minute(Sum([End Time]-[Start Time]))
It gives the total number of hours. This works he would always like it to
display 2 decimal places. For example, if the total is 11 hours even, he
would like it to display 11.00.
 
D

Duane Hookom

Try this expession:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start time])) &
":" & Format(Minute(Sum([End Time]-[Start Time])),"00")

--
Duane Hookom
MS Access MVP
--

maryj said:
We tried typing your suggestion in the format property but no change. Did
not
see that as an option in the drop-down of formats
--
maryj


Wayne Morgan said:
Try setting the Format property of the textbox to

#.00

--
Wayne Morgan
MS Access MVP


maryj said:
A client has this expression on a report:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start
time]))
&
":" & Minute(Sum([End Time]-[Start Time]))
It gives the total number of hours. This works he would always like it
to
display 2 decimal places. For example, if the total is 11 hours even,
he
would like it to display 11.00.
 
W

Wayne Morgan

You said you wanted two decimal places. Are you wanting to do hours and
fractions of hours or are you wanting to do hours and minutes (i.e. 11:30 or
11.50)?

--
Wayne Morgan
MS Access MVP


maryj said:
We tried typing your suggestion in the format property but no change. Did
not
see that as an option in the drop-down of formats
--
maryj


Wayne Morgan said:
Try setting the Format property of the textbox to

#.00

--
Wayne Morgan
MS Access MVP


maryj said:
A client has this expression on a report:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start
time]))
&
":" & Minute(Sum([End Time]-[Start Time]))
It gives the total number of hours. This works he would always like it
to
display 2 decimal places. For example, if the total is 11 hours even,
he
would like it to display 11.00.
 
G

Guest

Thanks Duane - worked like a charm!
--
maryj


Duane Hookom said:
Try this expession:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start time])) &
":" & Format(Minute(Sum([End Time]-[Start Time])),"00")

--
Duane Hookom
MS Access MVP
--

maryj said:
We tried typing your suggestion in the format property but no change. Did
not
see that as an option in the drop-down of formats
--
maryj


Wayne Morgan said:
Try setting the Format property of the textbox to

#.00

--
Wayne Morgan
MS Access MVP


A client has this expression on a report:
=(Int(Sum([End Time]-[Start Time]))*24)+Hour(Sum([End Time]-[start
time]))
&
":" & Minute(Sum([End Time]-[Start Time]))
It gives the total number of hours. This works he would always like it
to
display 2 decimal places. For example, if the total is 11 hours even,
he
would like it to display 11.00.
 

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

Top