Date Function Blues

Hi there

I’m using LotusScript to complete two fields - have tried both the Date and Today functions - both work fine in the fields, but the views show the date AND trailing zero for the time. Its not until the user changes the date that the trailing zeros are removed!

How do I format?

            Call doc.ReplaceItemValue("Last_Contact", Date)

Call doc.ReplaceItemValue("Next_Contact", (Date + 7))

Thanks

Subject: Date Function Blues

You need to use a NotesDateTime object in order to remove the time component:

Dim ndt As NotesDateTime

Set ndt = New NotesDateTime(Today)

Call ndt.SetAnyTime 'removes time component altogether

Call doc.ReplaceItemValue(“Last_Contact”, ndt)

Call ndt.AdjustDay(7)

call doc.ReplaceItemValue(“Next_Contact”, ndt)

Subject: RE: Date Function Blues

Brilliant! Works a treat.

Thanks Stan