Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. // Format a datetime object to include 'T' seperator and offset
  2. DateTimeOffset now = DateTimeOffset.Now;
  3. paymentDate = new DateTimeOffset(now.Year,
  4. now.Month,
  5. now.Day,
  6. 0,
  7. 0,
  8. 0,
  9. new TimeSpan(1, 0, 0))
  10. .ToString("yyyy-mm-dd'T'HH:mm:ssK");
  11.  
  12. // Example output 2019-09-04T00:00:00+1:00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement