Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to convert ChartTime back to Xojo date?
Answer: We have this example code:
Example:
Function ChartTimeToDate(ChartTime as Double) As date
static diff as Double = 0.0

if diff = 0.0 then
dim d2 as Double = CDBaseChartMBS.chartTime(2015, 1, 1)
dim da as new date(2015, 1, 1)
dim ts as Double = da.TotalSeconds

diff = ts - d2
end if

dim d as new date
d.TotalSeconds = diff + ChartTime

Return d
End Function
Notes: As you see we calculate the difference in base date from Date and ChartTime and later use difference to convert.

Feedback, Comments & Corrections




Links
MBS Xojo Plugins