I have date in string: "2013-07-22T08:51:38.000-07:00"
When I try parse this string, I receive date with offset of timezone.
How can I make it without timezone offset?
---UPDATE---
it is that I receive: DateTime.Parse("2013-07-22T08:51:38.000-07:00") = 7/22/2013 7:51:38 PM but I need to receive 7/22/2013 8:51:38 AM - DateTime without offset.
You can try the below one
If you have a
DateTime
object, you can use theDate
property on it to receive just the date.you can try this.
You can use the DateTime property of DateTimeOffset.
Example:
Outputs: