Datetime x-axis min and max values

TeeChart for ActiveX, COM and ASP
Post Reply
Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

Datetime x-axis min and max values

Post by Mike » Wed Jun 29, 2005 10:51 am

hello all,

I was wondering how to set the minimum and maximum of an x-axis (of datetime type) to EXACTLY to some datetime value, e.g. range from 2005-01-01 00:00:01 to 2005-01-31 23:59:59?

SetMinMax method does not approve datetime values of such format.

Thanks in advance!

Mike

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 Jun 29, 2005 1:45 pm

Hi Mike,

The following code works:

Code: Select all

    Dim XMin, XMax As Double
    
    XMin = #1/1/2005 12:00:01 AM#
    XMax = #1/31/2005 11:59:59 PM#

    TChart1.Axis.Bottom.SetMinMax XMin, XMax
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

Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

Post by Mike » Mon Jul 11, 2005 7:56 am

thanks,

this works, BUT

I need to construct the datetime value (XMin and XMax) from variables, having the Month and Year values. How can I do that? The '#' character is the problem here.

The user in my website can choose the month and year and the graph is updated according to those values.

Thanks in advance!

Mike

Mike
Newbie
Newbie
Posts: 40
Joined: Wed Jan 28, 2004 5:00 am

Post by Mike » Mon Jul 11, 2005 8:59 am

hmm,

never mind. Just learned how to use DateValue function........ ;-)


Mike

Post Reply