hi all,
i have problem with importing excel to axapta through class
iam getting all the fields exact data but problem with time fields.
i tried to convert using sring functoin…
still getting “0000” place of time field in table…
so could any one help me out of this…
waiting for reply… it
Thanks,
SriAditya
Hi Aditya,
the error may be of two reasons:
the value you entered in excel may be wrong value.
the field data type may be different.
check first that,If all is well then
Use the following code to insert into table from excel
timeStr = cells.item(i,1).value(); for example “09:45”,“10:50” etc;
time = str2Time(timeStr);
it will be converted as 09:45:00 am and will be inserted to table filed.
it worked for me.
Thanks and Regards,
Britto John Baskar.A
uma1234
September 12, 2012, 8:10pm
3
Hi Aditya,
Did u get the solution for this.??
Hi,
As Baskar given till Converstion of Second, so once again you have to add one more convertion from Seconds into Time
//////////////////////////////////////////////////////////////////////////////////
time2str(time, Timeseparator::Colon, TimeFormat::Hour24);
////////////////////////////////////////////////////////
This is the right Solution , Try this and implement wherever its required
Regards
SAADULLAH
http://msdynamicsax.weebly.com/1/post/2012/10/conversion-of-time-in-ax2009.html