J
John
I have a drop down that is showing dates, I need to pass the selected date
to my proc, so I pass it like this;
getCarSales(Convert.ToDateTime(carTimeFrame.selectedItem.value).ToShortDateString());
but when i compile I'm getting the error"
'cannot convert from 'string' to 'system.datetime'
even if i hard code a date i'm getting this error. Now the getCarSales
method as the date as
public DataTable getCarSales(DateTime startDate, DateTime endDate)
{
call's the stored procedure
}
why am i getting this error and ow can i fix it?
to my proc, so I pass it like this;
getCarSales(Convert.ToDateTime(carTimeFrame.selectedItem.value).ToShortDateString());
but when i compile I'm getting the error"
'cannot convert from 'string' to 'system.datetime'
even if i hard code a date i'm getting this error. Now the getCarSales
method as the date as
public DataTable getCarSales(DateTime startDate, DateTime endDate)
{
call's the stored procedure
}
why am i getting this error and ow can i fix it?