{-TimeNow.Date-} + number of days

  • Автор темы Автор темы wanqwer
  • Дата начала Дата начала

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-} ?
 
I'm not familiar with programmimng languages too.
I use TickCount for that kind of tasks.

{-Environment.TickCount-}
 
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?
 
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);
 

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