That line of code works great for me. Create a separate project with
static void Main()
{
DateTime dt = new DateTime(2000,10,1);
Console.WriteLine(dt);
}
and see what comes out - lets just rule out your setup.
Regards
Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<#r**************@TK2MSFTNGP11.phx.gbl>
why does this code not work for me
DateTime dt = new DateTime(2000,10,1);
Looking in Locals a date of 1/1/1 is created??
According to the overloaded constructor DateTime(int year, int month, int
day) should work.
Br,
Mark.
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17/09/2004
[microsoft.public.dotnet.languages.csharp]