Status chart getToolTipText custom string

Hi all,
I am trying to return a custom tooltip on my statuschart with the following piece of code in the getToolTipText() extension function but it does return the default tool tip.

import system startDate = system.date.fromMillis(selectedTimeStamp) endDateCalc = self.selectedTimeStamp + self.timeDiff endDate = system.date.fromMillis(endDateCalc) customString = (startDate,endDate,selectedStatus) return customString

If I get rid of all the lines and leave the lines as below it works but the date is not really readable.

 customString = (selectedTimeStamp,timeDiff,selectedStatus) 

Could you point me in the right direction, please? Thanks!

Got it working by myself. The time in the getToolTopText() is in seconds from the epoch and I needed milliseconds to convert to date so just needed to multiply by 1000 and convert the number to long. Here is the code if anyone needs it:

startDateMillis = long(selectedTimeStamp * 1000)
endDateMillis = long(timeDiff * 1000)
endDateCalc = startDateMillis + endDateMillis
startDate = system.date.fromMillis(startDateMillis)
startDateFormatted = str(system.date.format(startDate, "dd/MM/yyyy HH:mm:ss"))
endDate = system.date.fromMillis(endDateCalc)
endDateFormatted = str(system.date.format(endDate, "dd/MM/yyyy HH:mm:ss"))
customString = (startDateFormatted,endDateFormatted,"Machines running:",selectedStatus)
return customString