Read the date value from the excel Read Cell getting 00:00:00

Hi I am reading the value from the excel but it’s giving me 00:00:00 in end since there is not 00:00:00 in the date format. I want just value see how I get image

see how my value in the excel.
image

@Palaniyappan

Fine in that case
lets take like excel gives us value like this “08/18/2019 00:00:00” and lets store it in a varaible like this
str_input = "08/18/2019 00:00:00"

now
str_output = Datetime.ParseExact(str_input.ToString.SubString(0,10),“MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd-MMM-yy”)

Cheers @balkishan

1 Like

Hi @balkishan

Use this DateTime.Parse(row(“Date”).ToString,“dd-MMM-yyyy”,System.Globalization.CultureInfo.InvariantCulture)

or
Cdate(row(“Date”).ToString(“MM/dd/yyyy”)

Thanks
Ashwin S

Thanks Palani Bro

1 Like

no worries
Cheers @balkishan

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.