Practice 2 - Lists & DateTimes and DateTimes in general

Hello, I’m doing uipath developer foundation course, I understand completely all subjects given about uipath so far except for some functions, specifically , dateTimes functions.

In exercises from video demonstration or practices, a lot of functions are applied, so, I annotate those functions to review it later. My problem is with DateTime functions, there are so many functions and I dont get it entirely.

I’m writing this post after doing Practice 2 - Lists &DateTimes because without those functions I was totally lost.

DateTime function Examples:

-DateTime.ParseExact(InputDate, “dd.MM.yyyy”, nothing) where “InputDate” is a varible, but I dont know what is “nothing”.

-TimeSpan variable type

-Datetime.Now.Subtract(new DateTime(Datetime.Now.Year, TmpDate.Month, TmpDate.Day))

Subtract is for calculating the difference between of days.

“New datetime” is for creating a new date, just as New list…(I guess)

“Datetime.Now.Year” Datetime is a variable, but Now.Year I guess is for identifying the current Year.
“TmpDate.Month” TmpDate is a variable, and .Month I guess is for identifying variable’s month.
“TmpDate.day” Same as .month

My query is, how can I learn those functions beforehand? those functions were totally unknown to me before that exercise, so I couldn’t do it by myself

2 Likes

Hey @AlvaroHG,

Nice to see you undergoing UiPath training

Yep, you can learn those things by practice. That’s why academy has challenges in between chapters.

You can also try learning from various sources, one of it is

https://www.w3schools.com/cs/

Thanks :slight_smile:

1 Like

yeah, it’s a way to learn new things, I know, but i wanted to do it first instead of think “Oh shit, i don’t know how to do this exercise”.

I going to check that website, thanks.

1 Like

Hello Alvaro,
In this video I do a lot of stuff with String and DateTime:

0:35 Examples for Substring functions
4:10 IndexOf and LastIndexOf
5:00 SubString working together IndexOf and LastIndexOf
6:45 Split string by character
8:50 Split string by string
12:00 Lower Case and Upper Case
12:45 Trim
15:05 Compare strings in multiple ways
19:05 Resume of all the String function part
20:05 DateTime to string in multiple ways
23:00 AddDays get DayofWeek
25:40 Convert from String to DateTime
26:20 Compare DateTime

Thanks,
Cristian Negulescu

Hi,

Can someone upload workflow file for Practice 2 - Lists & DateTimes

Regards,
Ashley