hkjobs1988
(Hitshs Kumar)
August 20, 2017, 2:34pm
1
Hi I am trying to get time from excel column, once i had declared DateTime type variable it showing error
“Date and Time Converter Can not Convert from System.Double”
When I tried in double type variable output came as below, I tried converting double to date again, could not work, Please HELP
Excel Column Format
anhth15
(hoanganh)
August 20, 2017, 3:34pm
2
hi @hkjobs1988 ,
Could you attach your excel file and workflow?
So we can help you easier.
Best Regards,
Hoang Anh.
hkjobs1988
(Hitshs Kumar)
August 20, 2017, 3:42pm
3
@anhth15 Thank you for response , attaching the same , kindly change the path in excel scope
S8509186.zip (10.2 KB)
anhth15
(hoanganh)
August 20, 2017, 4:02pm
4
Hi @hkjobs1988 ,
please refer my workflow in the attachment.
Best Regards,test_01.xaml (13.7 KB)
Hoang Anh.
2 Likes
aksh1yadav
(AKSHAY YADAV)
August 20, 2017, 4:27pm
5
Hey @hkjobs1988
You can try @anhth15 way. it is good by using Set Format activity
Just wanna add one more way for just your knowledge
You can use DateTime.FromOADate(yourdoublevalue) as well here
DateTime datetime_dt = DateTime.FromOADate(yourdoublevalue )
string time= String.Format(“{0:HH:mm:ss}”,datetime_dt )
Sample for your Reference : One_more_way.xaml (12.3 KB)
Regards…!!
Aksh
5 Likes
hkjobs1988
(Hitshs Kumar)
August 20, 2017, 4:36pm
6
Thank you @anhth15 and @aksh1yadav both method tested