always show 2 decimal places

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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.
 
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.
 
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.
 
Back
Top