How to select date in calender

i have mention the code in assign as
strDay= DateTime.ParseExact(StrInput1,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd”)
when i mention the date as 08/06/2022 it come as 08 . this is correct but i want to select date as 8 in calender it is nit able to select. what the changes has to do in code so that it come as 8 only

Hi @dhanu_lokhande ,

Use Tostring(“%d”)

This might help

Regards,

no its not work… date come in message box as MM/dd/yyyy.

@dhanu_lokhande , can you share the screenshot of your workflow with the expression you have used along with the displayed message box?

Regards,

@dhanu_lokhande

Instead of .ToString use .Day

image

Or use .ToString("%d")

image

Cheers

Hi Thanks sir … it work for me… but not able to select date from calender
it proper goes for month and year but not able to select date .
even i used correct strday variable in selector

@dhanu_lokhande

That looks liek your selector issue…

And if it is a date field…is there an option to type into the date?

If so better use it and convert in required format and use type into

Else you can try with set text as well

Cheers

You can write a custom code in python using selenium to select the specific date. You need to get the xpath of the date value and pass the variable value as date.