If you have a valid DateTime variable it will have a Year property.

int year = myDateIWantTheYearFrom.Year;
DateTime startOfyear = new DateTime(year, 1, 1);


On Thu, Nov 4, 2010 at 4:14 AM, Mac.D <[email protected]> wrote:
> I need help in order to get the first month and day of a certain year
>
> eg datetime=12-11-2010
>
> I need to get 01-01-2010

Reply via email to