Calculate number of days in the month and add 1

DateTime.ParseExact (MyVar, “MMddyyy”, System.Globalization.CultureInfo.InvariantCulture)

The value of MyVar is something scraped from some webpage. I can’t see it, since I don’t have access to the same screen.

its scraped from microsoft notepad

I need this value after the Get Text activity has already run:

@Anthony_Humphries

Run the activity one more step in.

Maybe with + CInt(MyVar.Trim) as it seems MyVar is a String scrapped from notepad.

Assign
MyDateTime = Now.AddDays(Date.DaysInMonth(Now.Year, Now.Month) - Now.Day + CInt(MyVar.Trim))

Type into
MyDatetime.ToString ("MMddyyyy")


@Anthony_Humphries

See attached:

Last day of the month.xaml (6,8 Ko)

Still giving me the same error
‘String was not recognized as a valid DateTime’

@Anthony_Humphries

Can you send me a screenshot when it’s throwing an error (running in debug mode)?

MyVar is an empty string. Your problem is in the Get Text on notepad.

@msan @Anthony_Humphries
Am using notepad to just test this, when i put the full process together i will extracting this info from a pdf

Then assign a value to MyVar to check if the following is valid, it would be easier.

Still the same error @msan

Could you please paste the error?

@msan

I mean, in debug mode