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

  • Creator
    Topic
  • #4354
    dgerisch
    Participant

      I have an applet I’m working on that creates a dialog box to present to the user:

      Set WhatForDlg = Utilities.NewControlBoxDialog
      WhatForDlg.Caption = “Create appointment”

      Set DateTime1 = WhatForDlg.AddDateTimeControl
      With DateTime1
      .Kind = fdtkTime
      .Time = iTimePeriodBegin
      .Caption = “Start Time:”
      End with

      Set DateTime2 = WhatForDlg.AddDateTimeControl
      With DateTime2
      .Kind = fdtkTime
      .Time = iTimePeriodEnd
      .Caption = “End Time:”
      End with

      This assumes that iTimePeriodBegin and iTimePeriodEnd are already defined. I want to adjust these using the dialog fields.

      Set objRecipient = objAppt.Recipients.Add(GroupWise.Account.Owner.EmailAddress,,0)
      With objAppt
      .StartDate = iTimePeriodBegin
      .EndDate = iTimePeriodEnd
      .Duration =
      End With

      Just doing this creates the appointment with the original times, not the updated times.

      The problem is that if I try .StartDate = DateTime1 (and .EndDate = DateTime2) then the result isn’t in the right format (and the applet errs out). Is there an easy way to convert the updated dialog datetime values into the right format for the appointment .StartDate and .EndDate ?

      Thanks!

    • Author
      Replies
    • #7903
      Support 3
      Participant

        Thanks for your feedback.

        Regards,
        Advansys Support

      Viewing 16 replies (of 16 total)
      • You must be logged in to reply to this topic.