Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# datetime remove days

// Just add the days you want to subtract as negatives
DateTime dateForButton = DateTime.Now.AddDays(-1);
// eg. DateTime.Now = 22.11.2021; DateTime.Now.AddDays(-1) = 21.11.2021
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #datetime #remove #days
ADD COMMENT
Topic
Name
8+3 =