How to assign 12:00:00 AM - 11:00:00 PM to Date/Time field using LotusScript

Hello,

I want to assign the following time interval to Schedule field of Connections document: 12:00:00 AM - 11:00:00 PM

I will be using LotusScript for that. Below is my code. The problem is that it assigns as text and not as date/time interval

Any help is really appreciated

Dim s As New NotesSession

Dim db As NotesDatabase

Dim doc As NotesDocument

Set collection = db.UnprocessedDocuments

Set db = s.CurrentDatabase

Set doc = collection.GetFirstDocument()

doc.schedule= “12:00:00 AM - 11:00:00 PM”

Subject: This works for me

Dim dateRange As NotesDateRange

Dim dtitem As NotesItem

Dim dtrange(1) As Variant

dtrange(0) = CDat(“12:01:00 AM”)

dtrange(1) = CDat(“11:59:00 PM”)

Set dateRange = s.CreateDateRange()

dateRange.text = CStr(dtrange(0)) + “-” + CStr(dtrange(1))

Set dtitem = doc.ReplaceItemValue( “Schedule” , daterange )

Subject: Thanks a Lot. It Works!!!