Assign Date Variable from Excel

Hello,

Can anyone help me with the following? I am trying to assign a date that I have in excel to a variable within a For Each to use in the ‘Deadline’ input in Add Queue Item activity.

The excel I am reading is below

The variable I am using is

I keep getting the error

image

Hi
Mention like this
DateTime.ParaeExact(row(“StartDate”).ToString.SubString(0,10),”dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture)

Or if that doesn’t work kindly check once what is the date format that we obtain from excel using a writeline activity where mention as row(“yourcolumnname”).ToString so that we can now the date format based on which we can frame the condition

Cheers @Bob2

Thanks for the response @Palaniyappan.

I tried your suggestion but I am getting the following error

image

I think I need to have the date format to be dd/mm/yyyy as I am using this for the DEADLINE on orchestrator so the bot knows when NOT to process an item.

fine this error comes when day is passed as month and there are totally only 12 months right
and if value 20 is passed it will throws this error
so the expression be like this
DateTime.ParaeExact(row(“StartDate”).ToString.SubString(0,10),"MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture)

Cheers @Bob2

1 Like

Thanks for your response but the thing is I am using DEADLINE functionality on Orchestrator. So I need the date to be added in UTC format as it reads the date of my system which is in UTC format dd/mm/yyyy

If I add the data in mm/dd/yyyy format it will confuse the date with what is on my machine