Hi everyone,
I have a little problem. I made an attribute where I can see my notes directly from the incident windows with a calculation. In my calculation, I use the objet note.creationdate to class them and also for information. The date shown is differente from the same exact objet I used for a query:
Here is the calculation I use:
import System
static def GetAttributeValue(Incident):
SortedNotes = List(Incident.Notes as Collections.IEnumerable)
SortedNotes.Sort() do (first, last):
return last.CreationDate.CompareTo(first.CreationDate) // this is newest to oldest order
// return first.CreationDate.CompareTo(last.CreationDate) // this is commented out but is oldest to newest
Value = ""
for Note in SortedNotes:
if Note.IsPrivate != null and Note.IsPrivate == true:
continue
Value += String.Format("\r\n<b><font color='#195319' size='3'>[<i>Note {0}</i> ajouté par <i>{1}</i> le {3}]</b></font>\r<BR /> {2}\n<BR /><BR /> ", Note.SerialNumber, Note.RaiseUser.Title, Note._text2, Note.CreationDate)
return Value
And here is my query:
The correct format is used in the query (dd/mm/yyyy), when in my calculation it give me another format (mm/dd/yyyy). Also, they have 5h difference, like they're not even in the same time zone.
It really weird since I used the same objet note.creationdate for both. So it's probably something in my calculation. Anyone know what it might be?
Thank you!