{-TimeNow.Date-} + number of days

wanqwer

Client
Регистрация
06.09.2012
Сообщения
18
Благодарностей
0
Баллы
1
Hello,
I'm not familiar with c#, so i wanted to ask:
How to add a number of days (ex 2-tomorow, 30-a month) to {-TimeNow.Date-} and get result in same format as {-TimeNow.Date-} ?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
I'm not familiar with programmimng languages too.
I use TickCount for that kind of tasks.

{-Environment.TickCount-}
 

wanqwer

Client
Регистрация
06.09.2012
Сообщения
18
Благодарностей
0
Баллы
1
Found a workaround to this with c#, but i don't know how to include my own variable to the c# code:

int month = 10;
int year = 2013;
int numberOfDays = DateTime.DaysInMonth(year, month);
DateTime lastDay = new DateTime(year, month, numberOfDays);
return lastDay;


Changing red part to 'project.Variables["month"].Value' how it's described by Hungry Bulldozer Here does not compile/work.
I want to include my variable in the red part of the code.
Can i?
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Found a workaround to this with c#, but i don't know how to include my own variable to the c# code:

int month = 10;
int year = 2013;
int numberOfDays = DateTime.DaysInMonth(year, month);
DateTime lastDay = new DateTime(year, month, numberOfDays);
return lastDay;


Changing red part to 'project.Variables["month"].Value' how it's described by Hungry Bulldozer Here does not compile/work.
I want to include my variable in the red part of the code.
Can i?
all variables of zenno are strings by default. So in case you need it in int type or another one you should convert it first.
int year = Convert.ToInt32(project.Variables["varName"].Value);
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)