خرید بک لینک

Vote count: 0

I am trying to simply substract to dates probally is a messy way of doing it it says it caot convert to double even though.

DateTime daysPlus14days = _dal.getOptinDate(new     
Guid(_myuser.id.ToString())).AddDays(14);
DateTime currentDate = DateTime.Now;
DateTime timeLeft = (daysPlus14days - currentDate).TotalDays

This just basically goes to db and gets me the date they created there account. Its just to work out how many days left they have 14 days to click a button other wise it will vanish.

public DateTime getOptinDate(Guid id)
{
        var q = _dal.portalEntities.tblPortalUsers.Where(a => a.id == id).FirstOrDefault();
        retu (DateTime)q.optinDateStart;          

}

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 18 تير 1395 ساعت: 17:33

صفحه بندی