Page 1 of 1

Datetime x-axis min and max values

Posted: Wed Jun 29, 2005 10:51 am
by 9080645
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

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

Posted: Mon Jul 11, 2005 7:56 am
by 9080645
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

Posted: Mon Jul 11, 2005 8:59 am
by 9080645
hmm,

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


Mike