ListFieldDateTime |
Contains information about the field used to display dates and times within a FrontPage list. The ListFieldDateTime object allows you to view date and time information in a variety of different configurations depending on the type of data in the list.
Use ListFields.Item(index), where index is the name or ordinal position of a field of type fpListFieldDateTime, to return a single ListFieldDateTime object.
Use the ListFields.Add method to add a field of type fpListFieldDateTime to the ListFields collection. The following example adds a new field named NewDateTimeField of type fpListFieldDateTime to the ListFields collection.
Sub CreateDateTimeField()
'Add new Date/Time field
Dim objApp As FrontPage.Application
Dim objLstFlds As ListFields
Dim strName As String
Set objApp = FrontPage.Application
Set objLstFlds = objApp.ActiveWeb.Lists.Item(0).Fields
strName = "NewDateTimeField"
'Add new Field of type fpFieldDateTime to list
objLstFlds.Add Name:=strName, Description:="New Date Time Field", _
Fieldtype:=fpFieldDateTime, Required:=True
MsgBox "A new Field named " & strName & " was added to the list " & _
objApp.ActiveWeb.Lists.Item(0).Name & "."
End Sub