I have the following code:
if (filtro.FinalDate != null)
{
FinalDate = String.Format(" Data <= '{0}' ", filtro.FinalDate.GetValueOrDefault().ToString("yyyy-MM-dd") + " 23:59:59");
}
But when I compile and type something in the FinalDate, the following message appears in the log:
Could not convert string to DateTime: 18/11/2014. Path 'FinalDate', line 1, position 102.