jan value= 0.5
feb=1
mah=1.5
now this month is march means
sick =1.5
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pradeep ShetRank #595 · 4K reputationPosted Jan 29, 2015, 10:09 PM EST
Get the current month
int iCurrentMonth = DateTime.Now.Month;
decimal updatesickLeave = 0.5 * iCurrentMonth;
Mark it as answered if it helped you.
ancy chacko70 reputationPosted Jan 29, 2015, 10:56 PM EST
VulpesRank #55 · 29.2K reputationPosted Jan 30, 2015, 11:37 AM EST
So Pradeep is getting the current month as an integer (from 1 to 12) and multiplying it by 0.5.
So March will give a sick value of: 3 * 0.5 = 1.5.
Pradeep ShetRank #595 · 4K reputationPosted Feb 2, 2015, 2:43 AM EST