I want to trip/remove seconds from date time. I checked some solution but showing solution using format string like
DateTime datetime = DateTime.UtcNow;
You can do
DateTime dt = DateTime.Now; dt = dt.AddSeconds(-dt.Second);
to set the seconds to 0.