Home ASP.NET MVC 5 Razor view map checkbox to a date field

ASP.NET MVC 5 Razor view map checkbox to a date field

1#
 I am relatively new to ASP.NET MVC. I have an MVC 5 application that's displaying results to a DataTable using the DataTable.net library. The field I'm trying to modify is a Date field but it's converted to a string by the View. What I'd like to do is add a checkbox to the left of the date string and if the date has a value in it then make the box checked. If it doesn't have a value then leave it unchecked. This is without adding a boolean field to the table. Just strictly reading if the field is null and toggling the checkbox based off of checking if it's null. Then the user can select multiple records and pass the selected records to the controller and update the database. I've tried doing a Checkboxfor but it complains about not being able to convert a system.date to a boolean. Below is the section of code for the view that populates the Table: 
@Html.LabelFor(m => m.Data.FirstOrDefault().Id) @Html.LabelFor(m => m.Data.FirstOrDefault().FPSampleType.Name @Html.LabelFor(m => m.Data.FirstOrDefault().FPProgram.Name) @Html.LabelFor(m => m.Data.FirstOrDefault().FPQualityControl.Value) @Html.LabelFor(m => m.Data.FirstOrDefault().DateAssigned) @Html.LabelFor(m => m.Data.FirstOrDefault().CheckedInDate)
@log.Id @log.FPSampleType.Name @log.FPProgram.Name @(log.FPQualityControl == null ? "" : log.FPQualityControl.Value) @log.DateAssigned.ToShortDateString() @(log.CheckedInDate == null ? "" : log.CheckedInDate.Value.ToShortDateString())
@foreach (var log in Model.Data) { @*other code not related to the data*@ ..... 
Kanstantsin Zinkevich
2#
Kanstantsin Zinkevich Reply to 2018-02-12 19:31:04Z
 I'm not sure I fully understand your question, I hope this helps. What I'd like to do is add a checkbox to the left of the date string and if the date has a value in it then make the box checked: 
@Html.CheckBox("name", log.CheckedInDate == null ? false: true) @(log.CheckedInDate == null ? "" : log.CheckedInDate.Value.ToShortDateString())

RAHUL S R
3#
RAHUL S R Reply to 2018-02-12 19:53:02Z
 well i have a different solution but working i believe  @foreach (var log in Model.Data) {
@log.Id @log.FPSampleType.Name @log.FPProgram.Name @(log.FPQualityControl == null ? "" : log.FPQualityControl.Value) @log.DateAssigned.ToShortDateString() log.CheckedInDate.Value.ToShortDateString()
@{ if(logCheckedInDate.CheckedInDate==null ) { } else { } } } 
 You need to login account before you can post.
Processed in 0.305117 second(s) , Gzip On .