Languages
[Edit]
EN

C# / .NET - subtract seconds from DateTime

10 points
Created by:
Theodora-Battle
528

In C# / .NET it is possible to subtract seconds from DateTime object in following way.

1. DateTime.AddSeconds method example

Edit

Output:

2. DateTime.Subtract method example

Edit

Output:

References

Edit
  1. DateTime.AddSeconds Method - Microsoft docs
  2. DateTime.Subtract Method - Microsoft docs
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

C# - DateTime

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join