Time Datatype Import to Excel In Axapta

sir,

I m facing problem during importing time field from excel file to Ax Table.

using

cells.item(1,1).value().time();

but its not working returning ‘1’;

How can i import Time from Excel to Ax Table.

You can use something like this:

timeofday rectime;

rectime = str2time(cells.item(row, 1).value().bStr());

info(strfmt("%1", time2StrHMS(rectime)));

Where rectime is the time field which you are extracting from Excel in string format and accordingly you can process it as you want.