Example:

  1. Sub Main

    1. Dim MyDate, MDate, MTime, MSTime

      MybDate = "May 29, 1959" ' Define date.

      MDate = CDate(MybDate) ' Convert to Date data type.

      MTime = "10:32:27 PM" ' Define time.

      MSTime = CDate(MTime) ' Convert to Date data type.

      Print MDate

      Print MSTime

    End Sub