/// <summary>
 /// Converts a System.DateTime object to a date object.
 /// </summary>
 /// <param name="dateTime">The DateTime object.</param>
 /// <returns>A Dfp Datetime object.</returns>
 public static DfpDateTime FromDateTime(System.DateTime dateTime)
 {
     DfpDateTime retval = new DfpDateTime();
       retval.date = new Date();
       retval.date.year = dateTime.Year;
       retval.date.month = dateTime.Month;
       retval.date.day = dateTime.Day;
       retval.hour = dateTime.Hour;
       retval.minute = dateTime.Minute;
       retval.second = dateTime.Second;
       return retval;
 }
 /// <summary>
 /// Adds a new DateTime value to the list of query parameters.
 /// </summary>
 /// <param name="key">The parameter name.</param>
 /// <param name="value">The parameter value.</param>
 /// <returns>The statement builder, for chaining method calls.</returns>
 public StatementBuilder AddValue(string key, DateTime value)
 {
     DateTimeValue queryValue = new DateTimeValue();
       queryValue.value = value;
       return AddValue(key, queryValue);
 }