Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adjust date to 7-day calendar week

Status
Not open for further replies.

gem28

Instructor
Nov 5, 2001
64
PH
Hi!
I've been trying to get the due date of the document base on the field CreateDate which, by default, has "Today" value. With lotusscript, i used the AdjustDay function. It was working fine until I place the value in the field. I got an error "Type Mismatch" plus, it does not display the correct date value in the dueDate field.

The code:
Code:
Dim dDate As New NotesDateTime(doc.CreateDate(0))
Call dDate.AdjustDay(+8)

Dim dts As String
dts = Format(dDate,"dd mmmm yyyy") -->> i get the error here.
Call source.FieldsetText("dueDate",dts)
Please, please help. Thanks so much!

tin
 
Your variable dDate is of type Date, and your variable dts is of type String.
In order to correct the error, you need to convert dDate to String, or use a different property of dDate, for example DateOnly which returns a String value.

Pascal.


I've got nothing to hide, and I'd very much like to keep that away from prying eyes.
 
Try this:

dts = Format$(dDate.LSLocalTime,"dd mmmm yyyy")

Brgds,

TrooDOS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top