/ Forums / Advansys Formativ / Creating Solutions with Formativ / Appointment duration from DateTime controls / Reply To: Appointment duration from DateTime controls

Support 3

    datetimepicker.Date() is a Read/Write property. You may only pass in a DATE to the property. Its returns a DATE.

    Utilities.DateToISO() method convert Date to ISO value and return as string. In your code above you are trying to pass the string to the Date() property which accept DATE.

    See the valid format where iISODate could be the Date value you read from the INI file:
    NewTimeRecord.DatePicker.Date = utilities.ISOToDate(iISODate)

    At the end of the process, save the date to INI file as ISO format:

    Advansys Support