我是水晶报道的新手。我的报告中有两个日期字段:Benefit Start
& Benefit End Dates
。
我必须比较员工的年龄。
1) If age>65 years, Benefit Start date should be '20160101'.
2) If age<65 years, Benefit Start date should be first day of the month effective.
eg: if the date is '09/21/2015', the output should be'09/01/2015'.
同样为福利结束日期,
If age<65 years, Benefit End date should be last day of the month effective.
eg: if the date is '09/02/2015', the output should be'09/30/2015'.
如何对日期中的日期进行硬编码,以便我获得第一天的日期和时间。这两个领域的最后几天?
请帮帮我
提前致谢。
答案 0 :(得分:0)
获取本月第一天
Timer MyTimer = new Timer();
private void Form1_Load(object sender, EventArgs e)
{
MyTimer.Interval = 45mins // Input from user
MyTimer.Tick += new EventHandler(MyTimer_Tick);
MyTimer.Start();
}
private void MyTimer_Tick(object sender, EventArgs e)
{
//pop my GUI application
}
获取最后一天使用
DateSerial ((Year (CurrentDate)),(Month (CurrentDate)) ,Day (Minimum (LastFullMonth)))
请用您的日期公式替换CurrentDate。