Excel format hours

Hi, I’m having some problems reading an excel file.

The file has this 2 columns when it’s open:
image

The cells have a date format.

When I used the workbook ‘read range’ activity without preserve format, the date came like this ‘02/01/2018’ and the hour like this ‘0.2644328703703’

When I used the workbook ‘read range’ activity with preserve format, the date came fine BUT the hour like this ‘[$-F401]h:mm:ss AM/PM’

How can I get the Hour like in the excel file

@KevinDS

Check as below for your reference
Tutorial : Convert Number to Date Format - #2 by system

Hope this may helps you

Thanks

Hi @KevinDS,

Take a look these 2 . It may help you.

To change the format in the excel.

To handle the date time in the datatable.

Videos :

Regards
Balamurugan.S

1 Like

Hi @KevinDS when u write the excel data in form of string as output can u show the output u got ?

Hi guys, Let me explain again…

I download from SAP this Excel file with this ‘Hour Format’ column:

Then. I need to get this exact hour. So I’ve put a Read Range activity in my sequence. Wich will give me a datatable ase we know.

image

When I put on the properties preserveFormat Unchecked.
image

I see the Hour Cells Captured like this:
image

When I put the properties preserveFormat Checked:
image

I see the Hour Cells Captured like this:
image

So… I don’t know what to do… I want to see it like i see it in the excel file

In the videos you’ve sent before. You already have a good value at the beggining and you’ve changed it to a number and the you’ve changed it again to date. Is not the same. My problem is that i’m not having the right first good value. I don’t know how to capture it :frowning:

@KevinDS - Is your issue resolved? if not, use this code…

image