D
David
Hi all,
I am using .NET 2
I have to work with short dates, e.g. 23 April 2008 will come to me as
23/04/08
I am splitting this value into int to put into a DateTime type...
DateTime MyDate = new DateTime(8, 4, 23);
However, when returned, it is returning as 23/04/0008 (obviously incorrect,
but the MyDate.WeekdayName is returning the correct week day name).
Later in my code, I have to do a select on a SQL based on the Date, and
23/04/2008 does not match 23/04/0008
Now, I can pass in the string direct (23/04/08) into my SQL and that will
work, however, I want to be ABSOLUTELY certain that say for example, 11 May
08 won't be interpreted as 5 Nov 08 which is why I am handling it by
splitting my incoming date string.
Any ideas on how I can get it to work the way I want?
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available
I am using .NET 2
I have to work with short dates, e.g. 23 April 2008 will come to me as
23/04/08
I am splitting this value into int to put into a DateTime type...
DateTime MyDate = new DateTime(8, 4, 23);
However, when returned, it is returning as 23/04/0008 (obviously incorrect,
but the MyDate.WeekdayName is returning the correct week day name).
Later in my code, I have to do a select on a SQL based on the Date, and
23/04/2008 does not match 23/04/0008
Now, I can pass in the string direct (23/04/08) into my SQL and that will
work, however, I want to be ABSOLUTELY certain that say for example, 11 May
08 won't be interpreted as 5 Nov 08 which is why I am handling it by
splitting my incoming date string.
Any ideas on how I can get it to work the way I want?
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available