Re: adding dates via Visual Basic

From: Kev <nitefrog_at_yahoo.com>
Date: Wed, 17 Jan 2001 21:04:19 GMT
Message-ID: <3a66079d.256570408_at_ns1.nothingbutnet.net>


Try this out:

          sDate = format(TheDate, "dd-mmm-yyyy")

That should do it for you,

Kev.-

On Wed, 17 Jan 2001 20:41:10 GMT, Jim Bishop <bishopjf_at_my-deja.com> wrote:

>I'm in Visual Basic and am trying to send a date to a 'date' column in
>an Oracle table. I have no problem with other types of data but I can't
>find the right combination of quotes to get the date to go in. I keep
>getting "Variable not in a valid date format". I think I have the field
>format right - when I put SYSDATE in it looks like this - January 17,
>2001 9:26:25 AM. I'm using the ORADC visual basic control. Here's my
>code:
>
> ORADC1.Recordset.AddNew
>
> ORADC1.Recordset("integer_long") = 1234567890
> ORADC1.Recordset("float_single") = 123456.7
> ORADC1.Recordset("date_string") = "January 17, 2001 9:26:25 AM"
>
> ORADC1.Recordset.Update
>
>Any ideas?
>
>Jim
>
>
>Sent via Deja.com
>http://www.deja.com/
  Received on Wed Jan 17 2001 - 22:04:19 CET

Original text of this message