Dividing a day into 8 hours/three time periods

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Dave C.
Newbie
Newbie
Posts: 7
Joined: Fri Jan 30, 2009 12:00 am
Location: Canada

Dividing a day into 8 hours/three time periods

Post by Dave C. » Wed Feb 11, 2009 2:13 pm

Hello,

I want to divide a day into three equal time periods to represent three shifts per day, that is, an increment of “dtEightHours”. There is a dtSixHours and a dtTwelveHours, but an eight hour interval is not available.

I tried a guess using Graph.Axes.Bottom.Increment := EncodeTime(8,0,0); but that does not work (“Not enough actual parameters”).

How can I setup a time interval of 8 hours or alternatively divide the day into three parts?

Thanks,

Dave.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 11, 2009 3:10 pm

Hi Dave,

Yes, you can divide one day per 3 like this:

Code: Select all

  Chart1.Axes.Bottom.Increment:=DateTimeStep[dtOneDay]/3;
Or multiply one hour increment 8 times:

Code: Select all

 Chart1.Axes.Bottom.Increment:=DateTimeStep[dtOneHour]*8;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Dave C.
Newbie
Newbie
Posts: 7
Joined: Fri Jan 30, 2009 12:00 am
Location: Canada

Post by Dave C. » Wed Feb 11, 2009 3:29 pm

Narcis,

Perfect! I used the DateTimeStep[dtOneDay]/3;

Thanks!

Best regards,
Dave.

Post Reply