Convert the Date Format

Hello Everyone,

I have a excel in which date is in ODate

I want to convert it into dd-MM-yyyy

Need help urgently

@SP_Bot

DateTime.FromOADate(Double.Parse(yourODate)).ToString("dd-MM-yyyy")

DateTime.FromOADate(yourDoubleVar).toString(“dd-MM-yyyy”)

Hi @SP_Bot

Assign the Value in Input

Try This:
DateTime.FromOADate(Input).ToString(“dd-MM-yyyy”)

Hope it will helps you :slight_smile:
Cheers!!

Hi @SP_Bot

Try this:

DateTime.FromOADate(CDbl(Strinput.ToString)).ToString("dd-MM-yyyy")

Regards

Hi @SP_Bot

If you data in datatable then use the below code in invoke code

dt.AsEnumerable().ToList().ForEach(Sub(row) row("DateColumn") = DateTime.FromOADate(CDbl(row("DateColumn"))).ToString("dd-MM-yyyy"))

Regards


IMG-20240229-WA0011

@ppr @Nawazish_Ahmad @rlgandu @Parvathy

Change the inverted doublequotes to "

1 Like

@SP_Bot

Please use proper proper DOUBLE QUOTES

Happy Automation:)

1 Like

Hi @SP_Bot

Retype the Double quotes . The error will be gone.

Regards

1 Like

Great you all genius :100:
Thanks for quick response :blush:

2 Likes

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