-1
I’m doing a communication program with Apis online and I’m using a header like DateTime
and I needed that date to stay on the ISO 8601
how can I do this ?
I’m using this to create the header :
var tempo = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ");
var httpWebRequest = (HttpWebRequest)WebRequest.Create("teste");
httpWebRequest.Headers.Add("Date"+ tempo);
The output is this:
Date 2017-09-08T15:25:53Z
I wish it was this:
Date: 2017-09-08T15:25:53Z
I edited the answer, what you wanted was something else.
– Maniero
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site.
– Maniero