Search a date from calendar

Hi,

I have an excel in which I have a column named “Date”. Now the process I have to automate is, to select the date from the excel and book an appointment in Portal’s Calendar.

But the format in Excel is eg 15-Oct-23 and form on portal has a fields with calendar icon from which I have to select 15-Oct-23.

Please suggest how can we do this

Thanks in advance

@sgarg

Can you provide the format which it was in the form

In the above which you have mentioned are in the same format

Or you can use below expression

stroutput=DateTime.ParseExact(strDate,“dd-MMM-yyyy”,System.GLobalization.CultureInfo.Invariant culture).ToString(“dd-MMM-yy”)

Here strdate is your input which is coming from excel

Cheers

Hi @sgarg

If there is any possible to type the date in the Calendar field, In that case you can use the Type into activity.

Hope it helps!!

Hi @sgarg

Check this:

Hi,
Date Format in Excel is :
image

And Date format in application is:

image

And when I have tried the expression given by you in Studio, to parse the date of excel in calendar format got below syntax error, Please correct where I went wrong:

@sgarg

there should be no space in inavrainatCulture can you check it once

cheers

Hi @sgarg

Try this

DateTime.ParseExact(Input.ToString,"dd/M/yyyy",System.GLobalization.CultureInfo.InvariantCulture).ToString("yyyy-MM-dd")

You can pass this variable using type into activity

@sgarg

DateTime.ParseExact(inputstr,“dd/M/yyyy”,system.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy-MM-dd”)

cheers

I run your expression, but got following issue:

@sgarg

type the expression, don’t copy and paste the expression

the error is because you have copied and pasted the expression

cheers

@sgarg

Don’t copy and paste the syntax there may be a error with double quotes please retype double quotes

Thanks for your help,it worked for me

1 Like

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