dear all,
i have an agent which should compare if two fields in a doc contain the same date:
field ‘Lieferdatum’ is type date and
field ‘Lieferdatum_1’ is type text (multivalue)
i want to check if the date in 'field ‘Lieferdatum’ is already in the textfield ‘Lieferdatum_1’ (this field keeps a ‘history’ of date-changes so it contains multible dates as a text list). for this i get the first value in this array (Lieferdatum(0), convert it to a date/time value and compare it with the value of ‘Lieferdatum’:
the following agent-script runs perfectly when startet on my client, but when running on the server, the line with Cdat gives an type mismatch error.
Dim lt As Variant
Dim lt_1 As Variant
Dim doc as Notesdocument
Set doc …
…
Let lt =“”
Let lt_1 =“”
Let flagtext=“”
lt = doc.Lieferdatum(0) 'retrieving a date
lt_1=Cdat(doc.Lieferdatum_1(0)) 'converting the datestring to a datevalue → error type mismatch only when run on server, not on client.
from the properties box:
Lieferdatum’s format is like 06.12.2006 Date/Time
Lieferdatum_1’s format is like “06.12.06” TextList
on my client the date separator is set to ‘-’ so when i print the date it shows me “06-12-06”
I also tried the same with Datevalue instead CDat which gives me an error message: Illegal function call.
please help!