计算项目中最后提交日期的问题 [英] Problem in calculating last submission date in project
本文介绍了计算项目中最后提交日期的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ASP.NET和C#
解决方案
你可以像这样验证它: (如果在编码方面)
DateTime SubmissionDate = DateTime.Now;
DateTime DeadlineDate = DateTime.Now.AddDays( 10 ); // 取决于您的天数限制
// 现在截止日期
if (DeadlineDate < DateTime.Now)
{
// 您的代码..
}
在保存记录之前,将今天的日期与提交日期进行比较喜欢
您提交的日期是2014-04-10
比保存前获得提交日期的价格并比较日期仅喜欢
If(DateTime.Now.Date == Convert.ToDateTime( 2014-04-10)。日期)
{
}
hi everyone. In my project if there is any dead line to submit an entry by user. Suppose if any of the user didn't upload their bio data before the deadline means they are considered as non submitted list. i want if submission date is not over only then user can upload.Can anyone help me to solve my problem? how to validate it? i tried to compare the dates but not getting exact direction Please help
ASP.NET and C#
解决方案
you can validate it like this: (if in coding side)
DateTime SubmissionDate = DateTime.Now; DateTime DeadlineDate = DateTime.Now.AddDays(10); // depends up on your limit of days // now at the day of deadline if(DeadlineDate < DateTime.Now) { // your Code.. }
Before saving the record, compare the today date with submission date like
You Submission Date is 2014-04-10
than before saving get the value of Submission date on form and compare the date Only like
If(DateTime.Now.Date == Convert.ToDateTime("2014-04-10").Date) { }
这篇关于计算项目中最后提交日期的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文