ajaffarali
New Member
I am currently having problems inserting the current date into an SQL server database. In the database I am uses a datetime field, whilst I get the current date using;<BR><BR>"dim mydate as date = datatime.now()"<BR><BR>This gives me an "conversion of a char type to a datetime data type out-of-range datetime value" error. This one must be pretty simple, but why? <BR><BR>Dim myDate as DateTime = DateTime.Now<BR><BR>Note that .Now is a _property_ of the DateTime class, not a method (hence you don't use the ()). In any case, be sure to read the docs!