I want to trip/remove seconds from date time. I checked some solution but showing solution using format string like
DateTime datetime = DateTime.UtcNow;
How about this rather elegant solution?
new DateTime(DateTime.UtcNow.Ticks / 600000000 * 600000000)
... which will also strip any milli/micro/nanoseconds.