sgarg
(Sgarg)
October 12, 2023, 8:38am
1
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
mkankatala
(Mahesh Kankatala)
October 12, 2023, 9:13am
3
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!!
sgarg
(Sgarg)
October 12, 2023, 9:21am
5
Hi,
Date Format in Excel is :
And Date format in application is:
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
lrtetala
(Lakshman Reddy)
October 12, 2023, 9:29am
7
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
(Sgarg)
October 12, 2023, 11:24am
9
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
lrtetala
(Lakshman Reddy)
October 12, 2023, 11:26am
11
@sgarg
Don’t copy and paste the syntax there may be a error with double quotes please retype double quotes
sgarg
(Sgarg)
October 12, 2023, 11:57am
12
Thanks for your help,it worked for me
1 Like
system
(system)
Closed
October 15, 2023, 11:58am
13
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.