Posts

Showing posts from February, 2024

Advanced DateTime Manipulation in UiPath: Part 2

Image
Welcome back to our DateTime Manipulation series! In this second part, we'll delve into advanced techniques that build upon the basics covered in our previous post. Get ready to explore topics like handling time zones and mastering complex date calculations as we take your UiPath skills to the next level. Let's dive in! 10. Difference in days between two dates          If Input:  Strinput = "10.01.2023"                        int_Days = DateDiff(DateInterval.Day, DateTime.ParseExact(Strinput.ToString, "dd.MM.yyyy", System.Globalization.CultureInfo.InvariantCulture),DateTime.Now)   ( Output DataType: System.Int32) 11. Difference in months between two dates           If Input:  Strinput =  "08-11-2023"                           int_Months =  DateDiff(DateInterva...

Basics of Date Time Manipulation in UiPath

   Understanding DateTime Variables: UiPath uses the Date Time data type to represent dates and times. This versatile data type allows you to perform various operations on dates and times, making it a crucial element in automation workflows. 1. Get Current Date in string format DateTime.Now. ToString() ( Output DataType: System.String) - Get Current Date in string format. Output Format: MM/dd/yyyy HH:mm:ss DateTime.Now ( Output DataType: System.DateTime) - Get current DateTime in DateTime variable DateTime.Now.Day ( Output DataType: System.Int32) - Get Date DateTime.Now.DayOfWeek ( Output DataType: System.DayOfWeek) - Get Day of week DateTime.Now.DayOfYear ( Output DataType: System.Int32) - Get count of day of year 2. Get different formats of datetime as string type DateTime.Now.ToString("d") - Prints whole Date Datetime.Now.ToString("dd") - Get current day alone - numerical terms Datetime.Now.ToString("dddd") - Get current day - full text...