Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

« FileMaker Conferences… | Home | Training day for MBS … »

Tip of Day: ChartTime back to date object


We had today the question how to convert back from ChartDirector time to a Xojo date. To solve this, we got this example code for you:
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
As you see we calculate the difference in base date from Date and ChartTime and later use difference to convert.
28 08 15 - 16:34
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.