计算项目中最后提交日期的问题 [英] Problem in calculating last submission date in project

查看:86
本文介绍了计算项目中最后提交日期的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好在我的项目中,如果用户提交条目有任何死线。假设任何用户在截止日期之前没有上传他们的生物数据意味着他们被认为是非提交列表。我想如果提交日期还没有结束,那么用户就可以上传。任何人都可以帮我解决我的问题吗?如何验证呢?我试图比较日期,但没有得到确切的方向请帮助

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆