here for variable vstartTime and vEndTime value is date & time in database i take data type datetime but it gives an error
error: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.\r\nThe statement has been terminated."
Gokul001
(Gokul Balaji)
September 26, 2022, 11:48am
2
Hi @Yogita_Gaikwad
Give some more detail with screenshot
Check out this thread
Execute Non Query: Error converting data type varchar to numeric.
hi uipath community!
i have a question regarding insert non query.
i have tried to using insert non query by using this query
“INSERT INTO [dbo].[PA_CTR] (CompanyCode,SAPCust_VendorCode,CustomerName,AcctType,TotalPAAmt,VirtualAcct,Assignment,DocumentNo,ReferenceKey,Currency,PaymentAmount,PartialPaymentAmount,Remarks) VALUES ('”+row(3).ToString+“’ ,'”+row(4).ToString+“’ ,'”+row(5).ToString+“’ ,'”+row(6).ToString+“’ ,'”+row(7).T…
Regards
Gokul
i have excel which has column StartTime which contains date & time i want to push this in database for this in multiple assign i create vStartTime variable and insert in database but it gives error :: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.\r\nThe statement has been terminated
Gokul001
(Gokul Balaji)
September 26, 2022, 11:59am
4
You need to format the insert query so that they’re inserted as Date & time not string (varchar). Update the insert query and check it @Yogita_Gaikwad
is there any need to change Row.item(4).ToString for conversion
Gokul001
(Gokul Balaji)
September 26, 2022, 12:08pm
6
Hi @Yogita_Gaikwad
Before doing CDate the value for Row.item(4).ToString should be presented. Need to update the inaert query first and run the process
Try with CDate
CDate(Row.item(4).ToString).Tostring("dd/MM/yyyy")
Regards
Gokul
system
(system)
Closed
September 29, 2022, 12:08pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.