Insert Date Error

Results 1 to 2 of 2

Thread: Insert Date Error

  1. #1
    Join Date
    Dec 1969

    Default Insert Date Error

    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 ="<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>

  2. #2
    Join Date
    Dec 1969

    Default Try this...

    Dim myDate as DateTime = DateTime.Now<BR><BR>Note that .Now is a _property_ of the DateTime class, not a method (hence you don&#039;t use the ()). In any case, be sure to read the docs! :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts