Expression For Converting Start/End Time to HH:MM

  • Hi All,

    I am having issues with specifying correct expression to display start time column to hh:mm. I tired all possible solutions but nothing works. I am attaching my report here.

    I need to display report where count column displays only the number and not 0, same for Hours. and Start/Last time to display only HH:MM...

    Any help would be appreciated. Dealing with this report for more than 2 days. Thanks.

  • Go to the properties window for your columns. Go to the Number tab and select Time in Category as well as your preferred format.

    You can also use the format function:

    =Format( Fields!somedate.Value, "h:mm tt")

    More information in here: https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • Luis Cazares (6/27/2016)


    Go to the properties window for your columns. Go to the Number tab and select Time in Category as well as your preferred format.

    You can also use the format function:

    =Format( Fields!somedate.Value, "h:mm tt")

    More information in here: https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx

    Thanks for the reply. I tired the above but still no luck. I need to show the report as follows:

    1. In the below pic we have count and hours tab in this we need to remove 0 value from each field and display only the values for hours instead of 7.20000 we need to display only 7.2.

    2. For start time and Last time I used expression (=iif(len(Fields!Monday_First_Time.Value) = 1 ,"",cstr(formatdatetime(Fields!Monday_First_Time.Value,DateFormat.ShortTime))) this is working fine if any hours are entred by if the hours are 0 it display's as #Error.

    This has driving me nuts from last couple of days.

  • Please share the values and data types, with the end format you wish to obtain. Please post different examples to understand the different possibilities.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply