Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get the integer between the dates

Tags:

c#

i am programming in c# and i have question: how can i get the integer value between a date. for example : 12/6/2010 and 12/18/2010 how can i get at 1st i=6 and in the second i=18

like image 253
scatman Avatar asked Nov 27 '25 08:11

scatman


1 Answers

DateTime dt = DateTime.Parse("12/6/2010");
int i = dt.Day;

See: DateTime reference

like image 170
Arsen Mkrtchyan Avatar answered Nov 29 '25 23:11

Arsen Mkrtchyan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!