Hi, I want to download few files from the website giving first BD of the month. how to give date format in UI path?
use click activity
but before this please elaborate your requirement
Regards
Usha
Hi Usha, here I’m trying to download files from an website where we have to give date as first working day of the current month. so which option should I select?
Use type into
type the date of the variable first working day of the month
Use the below syntax
DateTime.ParseExact(“23/03/2023”,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“Your date format like dd-MM-yyyy”)
or
use this
new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).Day.ToString
Below one will give you first date of Month.
new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1)
to get the first day
new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).tostring(“dddd”)
hope this helps
A too long one liner, but illustrating the initial idea:
{0,7}.SkipWhile(Function (x) Not {DayOfWeek.Sunday,DayOfWeek.Saturday}.Contains(new DateTime(Now.Year, now.Month,1).AddDays(x).DayOfWeek + 0))
hi @ramyashree.ks
use below query
in_arr={“Sat”,“Sun”}
If(in_arr.Contains(New DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString(“ddd”)),If(in_arr.Contains(New DateTime(DateTime.Now.Year, DateTime.Now.Month, 2).ToString(“ddd”)),(New DateTime(DateTime.Now.Year, DateTime.Now.Month, 3).Day.ToString),(New DateTime(DateTime.Now.Year, DateTime.Now.Month, 2).Day.ToString)),(New DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).Day.ToString))