Get time format value from Excel Coulmn

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


hi @hkjobs1988,

Could you attach your excel file and workflow?
So we can help you easier.

Best Regards,
Hoang Anh.

@anhth15 Thank you for response , attaching the same , kindly change the path in excel scope (10.2 KB)

Hi @hkjobs1988,

please refer my workflow in the attachment.

Best Regards,test_01.xaml (13.7 KB)

Hoang Anh.

1 Like

Hey @hkjobs1988

You can try @anhth15 way. it is good by using Set Format activity :slight_smile: :+1:

Just wanna add one more way for just your knowledge :slight_smile:

You can use DateTime.FromOADate(yourdoublevalue) as well here :slight_smile:

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)



Thank you @anhth15 and @aksh1yadav both method tested

You are welcome :slight_smile: