i am using asp.net 2.0 and database is Mysql and i am passing null value using datetime datatype to mysql table like this duedate is datetime
if (ddlTerms.SelectedItem.Text.ToString() != "--Select--")
{
DateTime createDate = DateTime.Now.AddDays(Convert.ToDouble(ddlTerms.SelectedValue));
oInvHeader.DueDate = createDate;
}
else
{
oInvHeader.DueDate =(how to write the code here)
}
in invoiceHeader.cs code
using System;
using System.Data;
using MySql.Data.MySqlClient;
using System.Text;
private DateTime m_DueDate;
public DateTime DueDate
{
get
{
return m_DueDate;
}
set
{
m_DueDate = value;
}
}
pls help me thank u hemanth