Date and time library
datetime(Input) - used to get date and time components depending on Input value:
0 - get seconds.
1 - get minutes.
2 - get hour of the day considering AM/PM.
3 - get hour of the day.
4 - get day of the week (1-Sunday, 2-Monday…).
5 - get day of month.
6 - get month (0 - January, 1 - February…).
7 - get year.
8 - get minutes of the day (hour*60 + minutes).
int a = datetime(7);
a = 2020;
currentdatetime(Input1) - used to get current date and time in string format. Input1 contains format of the date and time. Function returns formatted current date and time.
string date = currentdatetime(“YYYY-MM-dd HH:mm:ss”);
date = "2020-09-15 14:22:12"