String conversion problem in Timespan

Asked

Viewed 159 times

0

In the system I’m developing a user sends me a TimeSpan via Post, but when I catch the String that should be the TimeSpan and apply a TimeSpan.Parse he gives the error:

"Could not parse Timespan because at least one of numerical components is out of range or contains too many digits."

To string is coming to me like this : 1416395054

  • 1

    Kaique, performed a test and converted to "00:02:21.6395054" ! var tempo = new Timespan(1416395054);

1 answer

1


Kaique, I performed a test and converted to "00:02:21.6395054" !

var tempo = new TimeSpan(1416395054);

inserir a descrição da imagem aqui

  • sorry, I didn’t mind turning to int, since in the description of the method accepts string, Thank you so much for the help

Browser other questions tagged

You are not signed in. Login or sign up in order to post.