i write the flowing procedure to read an excel file having cell with format date:
P03_IMPORT_ELCTRS_MOHAF_JBLLE (p_file_xls in varchar2, p_sheet_xls in varchar2, nbr_of_pages in integer DEFAULT 1)
AS
result INTEGER;
filename varchar2(255);
cell_value1_date_concat_char varchar2(100);
BEGIN
filename := 'C:\Climate_File\' || p_file_xls || '.xls';
result := ORDExcelSB.CreateExcelApplication('');
result := ORDExcelSB.OpenExcelFile(filename, p_sheet_xls); -- p_sheet_xls := 'sheet1'
cell_value1_date := ORDExcelSB.GetDataDate('E' || 1);
cell_value1_date_concat_char:=to_char(cell_value1_date, 'DD/MM/YYYY' );
dbms_output.put_line(cell_value1_date_concat_char);
result := ORDExcelSB.ExitExcel();
EXCEPTION
WHEN OTHERS THEN
result := ORDExcelSB.ExitExcel();
RAISE;
END;
from isql plus i execute the procedure as follow
SET SERVEROUTPUT ON;
DECLARE
BEGIN
P03_IMPORT_ELCTRS_MOHAF_JBLLE ('25000_0000_010', '25000_0000_010', 1);
END;
the result of cell_value1_date_concat_char is : 02/08/1380 which is different to the value of the cell in excel file "25000_0000_010.xls" which is = 1/19/1961..
what can i do to let my procedure read successfully the date cell in the excel file "25000_0000_010.xls" ?
any help i appreciate it.
thank you.