Das Notes Forum

Domino 9 und frühere Versionen => ND9: Entwicklung => Thema gestartet von: MLe56 am 14.12.16 - 16:20:16

Titel: Format-Funktion in Lotus Script
Beitrag von: MLe56 am 14.12.16 - 16:20:16
Ich wolle eine NotesDateTime-Object im Format "yyyymmdd" ausgeben.
Bei der Funktion Format(<notesdatetime>,"yyyymmdd") bzw. Format(<notesdatetime>) erscheint die Fehlermeldung "Type Mismatch"

Beispiel:
Set dtTmp = sess.Createdatetime("Today")
Print Format(dtTmp)

Mit einem num. Wert in der Formatfunktion funktioniert es:
print Format(36525, "yyyymmdd")

Weiß jemand, wie die Formatfunktion richtig angewendet werden muss?

Matthias


Titel: Re: Format-Funktion in Lotus Script
Beitrag von: Tode am 14.12.16 - 16:23:39
Format geht nur auf ein Variant vom Typ DateTime, NICHT auf ein Objekt der Klasse NotesDateTime.

Probier mal:
Code
Print Format(dtTmp.LSLocalTime)
Titel: Re: Format-Funktion in Lotus Script
Beitrag von: MLe56 am 14.12.16 - 16:45:26
Hallo Torsten,
danke für die schnelle Antwort, genau so funktioniert's.
MfG
Matthias