Format value activity

Hi,
I have an excel with a column of dates in format “MM/dd/yyyy” and i want to change this format into “dd/MM”. When im using format value activity im getting error like cannot assign system.string to type system.core.genericvalue. Is there any other solution to solve this

HI @Amruta_George1

How about this expression?

DateTime.ParseExact(StringInput.ToString,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM")

Regards
Gokul

HI @Amruta_George1

Can you share the Expression you used to convert?

and also can you check the datatype the variable it seems like variable type is genericValue and the expression u are using is string

if the variable is generiv value change them to String

Regards
Sudharsan

Hello @Amruta_George1
Use Modern Excel actvity

  1. Excel process scope and place use excel file activity in it.
  2. Use Format Cells activity and Set the format as your desired in Custom- dd/mm
  3. Source should be given in range like Excel.Sheet(“SheetName”).Range(“A:A”)
    image

image

image

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