The index and length shall refer to a location within the sequence

Asked

Viewed 522 times

1

I need to break a variable to get the value of the database. Today my full return would be "2017-09-15T14:01:46" I need only 2017-09-15 and 14:01, tried to do

.Substring(0,10) for the date and worked, already for the time tried Substring(11,16) and occurs the error that is in the question title.

1 answer

1


You can’t do something like that?

data.ToString("yyyy-MM-dd hh:MM")

Browser other questions tagged

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