Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

How to use DateAdd function in c#?

$
0
0

hi my name is vishal.

i am on a project ie: converting a project of vb6 with ms-access to c#(framework 4.5) with sql server 2008. 

 dtDOB.MaxDate = dtDOB.Value;

where as in vb6 it is

  dtDOB.MaxDate = DateAdd("yyyy", -10, Now)

where dtDOB is name of datepicker.

how do i use DateAdd function in c# as i easily used in vb6. how i convert the above line in vb6 to c#.


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>