Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21846

I am getting error The conversion of a char data type to a datetime data

$
0
0
Dear Sir
How are you?

I got the following error in VB

but the error is with sql server

[Microsoft][ODBC SQL Server Driver][SQL Server]
The conversion of a char data type to a datetime data type resulted in
an out-of-range datetime value.

I am getting this error while inserting values

Insert into overtimeexemption(OTENumber, OTEdate, ExemptedDate,
TimeFrom,TimeTo,ExemptedReason,PreparedBy, PreparedDateTime,
FinYearCode) values(3, '29/10/2012' , '15/04/2010' ,'29/10/2012
5:40:00 PM','29/10/2012 5:40:00 PM','dfasdf', 2, '2012-10-29
17:40:34', 20122013)

table structure

OTENumber smallint no 2 5 0 no (n/a) (n/a) NULL
OTEDate smalldatetime no 4 no (n/a) (n/a) NULL
ExemptedDate smalldatetime no 4 no (n/a) (n/a) NULL
TimeFrom datetime no 8 no (n/a) (n/a) NULL
TimeTo datetime no 8 no (n/a) (n/a) NULL
ExemptedReason nvarchar no 400
no (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
PreparedBy smallint no 2 5 0 no (n/a) (n/a) NULL

I think the problem is with datetime columns.

Please help me.

Thanks
Ramachandran

Viewing all articles
Browse latest Browse all 21846

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>