see here we store offset. so tell me what is the importance of storing offset data along with date and time ?
public void DemoDateTimeOffset()
{
DateTimeOffset offsetValue = new DateTime(2017, 1, 21, 4, 34, 0);
using (SqlConnection cn = new SqlConnection(myConnection))
{
string commandText = @" INSERT INTO DateTimeDemo (DateTimeExample,DateTimeOffsetExample)
VALUES (@DateTimeExample,@DateTimeOffsetExample)";
using (SqlCommand cmd = new SqlCommand(commandText, cn))
{
cmd.Parameters.AddWithValue("@DateTimeExample", DateTime.Now);
cmd.Parameters.AddWithValue("@DateTimeOffsetExample", offsetValue);
cn.Open();
cmd.ExecuteNonQuery();
}
}
}