• Creator
    Topic
  • #4432
    HeleneB
    Participant

      I am creating a simple appointment export to excel. How do I extract just the appointment start time from the StartDate field and conversely, how do I extract just the date from the StartDate field.

      Many thanks
      Helene

    • Author
      Replies
    • #8165
      Support 3
      Participant

        See the Visual Basic Scripting Guide which provides various Date functions. You can access the guide from GroupWise – Help – Formativ Help menu or from Formativ IDE – Help menu.

        Sample code below uses FormatDateTime() funstion to access date & time, also uses Year(), Month(), etc function to extract part of the date.

          
          msgbox FormatDateTime(iStartDate, vbShortDate)
          msgbox FormatDateTime(iStartDate, vbShortTime)
        
        
          msgbox "Year: " & Year(iStartDate) & ", Month: " & Month(iStartDate) &_
          ", Day: " & Day(iStartDate) & ", Hour: " & Hour(iStartDate) &_
          ", Minute: " & Minute(iStartDate) & ", Second: " & Second(iStartDate)
        

        Regards,
        Advansys Support

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