none
Convert to Hour:Min in Expression

    Question

  • I have this expression that return number like 320,

    Avg(Fields!final_rep_response1.Value)

    How I can write an expression the way that shows 300 as Hour:Minutes

    like: 5:19

    Thursday, March 15, 2012 6:16 PM

Answers

  • Hi,

    Something like

    =floor(Avg(Fields!final_rep_response1.Value)/60) & ":" & ROUND(Avg(Fields!final_rep_response1.Value) mod 60,2)


    Regards,

    Asim Bagwan

    Kindly mark the replies as Answers if they help!

    Friday, March 16, 2012 9:49 AM

All replies

  • you have 320 but want it to show as 5:19. Isn't it supposed to be 5:20? 

    Anyway, try:

    =floor(320/60) & ":" & 320 mod 60

    substitute the 320 with your field name


    Call me Sam. Once a gunners always a gunners


    Thursday, March 15, 2012 6:39 PM
  • How I can round it to 2digits. This is returning: 3.22222 I like to return for example: 3.22 =floor(Avg(Fields!final_rep_response1.Value)/60) & ":" & Avg(Fields!final_rep_response1.Value) mod 60 Thanks,
    Thursday, March 15, 2012 11:50 PM
  • Hi,

    Something like

    =floor(Avg(Fields!final_rep_response1.Value)/60) & ":" & ROUND(Avg(Fields!final_rep_response1.Value) mod 60,2)


    Regards,

    Asim Bagwan

    Kindly mark the replies as Answers if they help!

    Friday, March 16, 2012 9:49 AM