My question seems simple to solve however I haven’t been lucky so far. I’m using a Get Text activity to get the following from a web page. Since I only want the date, I use String.Substring(18).TrimEnd successfully.
But afterwards I want to convert this to an actual date format, so I can check if it is located between two other dates. The problem is when I do DateTime.ParseExact(String, “yyyy/MM/dd”, System.Globalization.CultureInfo.InvariantCulture), the date comes back in dd/MM/yyyy, and I need it in the original format.
You have to change the format after this, what you are currently doing.
You can use this statement:
for example you save the result date after trim in variable: dateWeb
dateWeb.ToString(“yyyy/MM/dd”)
Thank you. But then won’t this result in a string? I would like to get the final result in a Date format so I can compare with other dates. Is there a way to do this?
U can parse it get it in , dd/MM/yyyy do the comparison with other dates and then if you need the result in your initial format , give the output format as , youroutput.tostring(“yyyy/Mm/dd”)