Examples: TimeDateFmt property

This agent toggles the time-date format.

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim view As NotesView
  Dim vc As NotesViewColumn
  Dim f As String
  Set db = session.CurrentDatabase
  Set view = db.GetView("View A")
  Set vc = view.Columns(2)
  If vc.DateFmt = VC_FMT_DATE Then
    vc.DateFmt = VC_FMT_DATETIME
    f = "Date + time"
  Elseif vc.DateFmt = VC_FMT_DATETIME Then
    vc.DateFmt = VC_FMT_TIME
    f = "Time"
  Elseif vc.DateFmt = VC_FMT_TIME Then
    vc.DateFmt = VC_FMT_TODAYTIME
    f = "Today + time"
  Else
    vc.DateFmt = VC_FMT_DATE
    f = "Date"
  End If
  Messagebox f,, "New date format"
End Sub