public static DateTime ToStartDateTime(string startDate)
{
try
{
return Convert.ToDateTime(startDate);
}
catch
{
return DateTime.MinValue;
}
}
public static DateTime ToEndDateTime(string endDate)
{
try
{
return Convert.ToDateTime(endDate);
}
catch
{
return DateTime.MaxValue;
}
}
public static DateTime ToSqlServerStartDateTime(string endDate)
{
try
{
return Convert.ToDateTime(endDate);
}
catch
{
return new DateTime(1753, 1, 1);
}
}
public static DateTime ToSqlServerEndDateTime(string endDate)
{
try
{
return Convert.ToDateTime(endDate);
}
catch
{
return new DateTime(9999, 12, 31);
}
}
{
try
{
return Convert.ToDateTime(startDate);
}
catch
{
return DateTime.MinValue;
}
}
public static DateTime ToEndDateTime(string endDate)
{
try
{
return Convert.ToDateTime(endDate);
}
catch
{
return DateTime.MaxValue;
}
}
public static DateTime ToSqlServerStartDateTime(string endDate)
{
try
{
return Convert.ToDateTime(endDate);
}
catch
{
return new DateTime(1753, 1, 1);
}
}
public static DateTime ToSqlServerEndDateTime(string endDate)
{
try
{
return Convert.ToDateTime(endDate);
}
catch
{
return new DateTime(9999, 12, 31);
}
}