code_junkie

How do I convert a date to a HTTP-formatted date in .Net / C#

Nov 10th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. string HttpDate = SomeDate.ToUniversalTime().ToString("r");
  2.  
  3. SomeDate.ToString("s");
  4.  
  5. SomeDate.ToUniversalTime().ToString("s");
Add Comment
Please, Sign In to add comment