i have a problem, i have a DateTimeOffset
and a DateTime
, and i want to know how to add the Offset to the DateTime?
DateTimeOffset e.g. is +02:00
Assuming that you need to add +2:00 to a DateTime
. You can do,
DateTime dateTime = DateTime.Now.AddHours(2.0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With