Home C#: TimeSpan subtract
Reply: 0

C#: TimeSpan subtract

user477
1#
user477 Published in April 21, 2018, 3:53 am

How can I subtract my value of time minus one hour. I've tried with Substract but it shows some errors. First time is time of movie and a second needs to be time-1hour.

    <td>
        @Html.DisplayFor(modelItem => item.movie.Time)
    </td>
    <td>
        @Html.DisplayFor(modelItem => item.movie.Time.Substract(-1))
    </td>

The error is "Cannot convert from int to TimeSpan".

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313145 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO