Question : Default Date Format - Visual Studio 2005 Parameters

I want to enter a specific date as the default value for a parameter in Visual Studio.
Ex: 1/1/2010
Currently the only dates that it will take are now(),etc.

What is the format I need to use?

Answer : Default Date Format - Visual Studio 2005 Parameters

So, your problem is that you are sending the wrong data type.  FormatDateTime returns a String.  The last line returns a Date.  Have you tried sending a string?


        Dim myDate As Date = CDate("1/1/10")
        myDate = FormatDateTime(myDate, DateFormat.GeneralDate)
        myDate = CDate(myDate)

        The result is 1/1/2010
       
 If this is still not what you want, then maybe you could give me your sample code that doesn't work.
Random Solutions  
 
programming4us programming4us