Domino 9 und frühere Versionen > Entwicklung
@Today - Datumsfeld
robertpp:
Ich habe in FS ein Code der lautet:
SetField("difdate";(ArchEndTime-@Today)/86400);
Das liefert mir eine ganze Zahl zurück wie viele Tag zwischen den Tagen liegen. das auch richtig ist.
Das ganze wollte ich mir jetzt im LS-Sprache auch basteln nur bekomm ich da immer ein Zahl mit dezimalstellen. Ich habs mal so probiert :
doc.difdate=(doc.ArchEndTime(0)-Today())/86400
oder
doc.difdate=(doc.ArchEndTime(0)-Date)/86400
bitte um hilfe robertpp
Rob Green:
Martin Scott / http://www.martinscott.com/DesignLibrary.nsf/scategory/B86B846410A8922985256C08001DF55E?opendocument :
'doc is a notesdocument to find difference in days between say today
'and another date say doc.created i.e the date of creation of the
'document
daydiff=abs(int(Cbdl(Today)-Cbdl(doc.created)))
'would do "Cbdl" is used to get the double numeric format of the dates
'the decimal part which is time is removed by using "Int" and "Abs"
'returns absolute value
oder Ata´s Datehandling DB:
http://www.anton-tauscher.de/Download/DateHandling.zip
robertpp:
wo ist das ganze in ata seiner DB?
robertpp
Till_21:
wenn mich nicht alles taeuscht, in einer Script-Bibliothek...
gruss
robertpp:
Ich komm leider zu keiner lösung ich hab auch schon einiges ausprobiert ich weiß aber nicht ob das überhaupt so funken kann!
' doc.difdate=Abs(Int(Cdbl(doc.EndTime)-Cdbl(Date)))/86400
' doc.difdate=(Day(doc.EndTime)-Date)/86400
' doc.difdate=(Datevalue(doc.EndTime)-Date)/86400
' doc.difdate=Abs((doc.EndTime(0)-Date)/86400)
das EndTime-Feld ist ein Datumsfeld!!
kann mir wer weiter helfen!
robertpp
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln