Your trans_in.ToString()
would return you the string representation of your DateTime
object based on your current culture, its better if you check your DateTime
like:
public static string NotAttend(DateTime trans_in)
{
if(trans_in == new DateTime(1900, 1, 1))
{
return string.Empty;
}
else
return trans_in.ToShortTimeString();
}