sql - Data is converting into some weird data in asp.net -


i uploading excel database creating type in database , inserting data table.

for example:

create type [dbo].[temp_tbl_vendor] table([vendorcode] [varchar](10) null, [billdt] [varchar](12) null )  create proc myproc_bulkinsert (@venid int, @temptable temp_tbl_vendor readonly)  begin insert mynewtab select *from temp_tbl_vendor  end 

everything working fine problem excel data 20150702 changing 2.01507e002.

there couple of issues in design.

  1. never store date string in database. date date , should stored in datetime field.

change temp_tbl_vendor to:

create type [dbo].[temp_tbl_vendor] table([vendorcode] [varchar](10) null, [billdt] datetime null ) 

change corresponding column in mynewtab datetime field

  1. you need convert spreadsheet column date type and/or more importantly read date field before inserting temp_tbl_vendor.

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -