Hi,
I'm using oleDB in VB.NET to read database from Excel.
In Excel I have 2 columns datatype: DATE. 1st column contain usual date, 2nd column contain Arabic date (take value exactly from 1st column).
In VB, I have DataGridView to display table from Excel.
This is my coding:
da = New OleDbDataAdapter("SELECT * FROM [Sheet1$], oleConn) 'oleConn is OleDbConnection (initialize earlier) ds = New DataSet
dgvData.DataSource = Nothing 'dgvData is name for DataGridView
da.Fill(ds, "dat") dgvData.DataSource = ds.Tables("dat")
|
This is the result:
Now, my questions:
1. How can I show Arabic date format in column 'Adate' without change any format in Excel?
2. What is data type I must assign to retrieve Arabic date format for "CREATE TABLE", in case I want to store it in database (MySQL)?
- I tried using DATE, CHAR, NCHAR, VARCHAR, TEXT, but it make no change..
TQ.