[Solved] ASP.Net Error: Cannot implicitly convert type System.DateTime? to int

Last Reply 7 months ago By dharmendr

Posted 7 months ago


I have one stored procudure

CREATE PROCEDURE [dbo].[PayProcess] 
    -- Add the parameters for the stored procedure here
    (@Date Date)
    SELECT 'Procedure Run sucessfully' As 'Procedure'

Currently my requirement is that whar ever data i have selected need to display it on grid view

in controller i am getting error 

cannot convert from 'System.DateTime?' to 'int?'

public JsonResult getAll1(DateTime? Id5)
    var result = db.PayProcess(Id5).ToList();
    var JsonResult = Json(result, JsonRequestBehavior.AllowGet);
    JsonResult.MaxJsonLength = int.MaxValue;
    return JsonResult;

Could you please kindly help me

This question does not have replies that have been liked.