NumberFormat for dates not working

I

Ian Hannah

I am using OWC10 for creating a chart in ASP.NET. I am suing data read from
a SQL Database and I am creating a Y axis and an X axis. The graph is
displaying data read at a number of different dates over a date range. The x
axis is displaying the dates.

The problem I am having is that the date format is always MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in US format.
I have noticed that if I set the enumeration to either auto or manual the
dates show in the correct format but the graph it wrong. If I set it to
NumberFormatEnum.None then the graph is correct but the date format is wrong.

Does anyone know what I am doing wrong or is there a bug in setting the
NumberFormat?
 
A

Alvin Bruney [MVP]

about 4 weeks ago, the issue was identified and a work around was presented
in the newsgroup, please google for the solution

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
I

Ian Hannah

Alvin,

Thanks for the reply. Unfortunately I have not managed to find the article
that illustrates the workaround. Could you please give me the details on the
link?

Thanks

--
Ian H


Alvin Bruney said:
about 4 weeks ago, the issue was identified and a work around was presented
in the newsgroup, please google for the solution

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Ian Hannah said:
I am using OWC10 for creating a chart in ASP.NET. I am suing data read
from
a SQL Database and I am creating a Y axis and an X axis. The graph is
displaying data read at a number of different dates over a date range. The
x
axis is displaying the dates.

The problem I am having is that the date format is always MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in US
format.
I have noticed that if I set the enumeration to either auto or manual the
dates show in the correct format but the graph it wrong. If I set it to
NumberFormatEnum.None then the graph is correct but the date format is
wrong.

Does anyone know what I am doing wrong or is there a bug in setting the
NumberFormat?
 
I

Ian Hannah

Alvin,

Do you mean this article:

Subject: How to display text in the format hh:mm for a category label?

Thanks

--
Ian H


Ian Hannah said:
Alvin,

Thanks for the reply. Unfortunately I have not managed to find the article
that illustrates the workaround. Could you please give me the details on the
link?

Thanks

--
Ian H


Alvin Bruney said:
about 4 weeks ago, the issue was identified and a work around was presented
in the newsgroup, please google for the solution

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Ian Hannah said:
I am using OWC10 for creating a chart in ASP.NET. I am suing data read
from
a SQL Database and I am creating a Y axis and an X axis. The graph is
displaying data read at a number of different dates over a date range. The
x
axis is displaying the dates.

The problem I am having is that the date format is always MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in US
format.
I have noticed that if I set the enumeration to either auto or manual the
dates show in the correct format but the graph it wrong. If I set it to
NumberFormatEnum.None then the graph is correct but the date format is
wrong.

Does anyone know what I am doing wrong or is there a bug in setting the
NumberFormat?
 
S

Sputnik

Alvin,

I have looked at this article and it does not seem to help me.

This is what I am doing:

// Add the dates to the array
rgDates.Add(SqlData.GetDateTime(idxDate));

// Set the dates
Series.SetData(ChartDimensionsEnum.chDimCategories,
(int)ChartSpecialDataSourcesEnum.chDataLiteral,
rgDates.ToArray());

DateAxis.HasTitle = true;
DateAxis.NumberFormat = "MM/YYYY"

DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingNone;
// DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingAuto;

If I comment out the chAxisGroupingNone line and uncomment the line
below then the date formatting works and I have no idea why!

Ian

Ian said:
Alvin,

Do you mean this article:

Subject: How to display text in the format hh:mm for a category label?

Thanks

--
Ian H


Ian Hannah said:
Alvin,

Thanks for the reply. Unfortunately I have not managed to find the article
that illustrates the workaround. Could you please give me the details on the
link?

Thanks

--
Ian H


Alvin Bruney said:
about 4 weeks ago, the issue was identified and a work around was presented
in the newsgroup, please google for the solution

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------



I am using OWC10 for creating a chart in ASP.NET. I am suing data read
from
a SQL Database and I am creating a Y axis and an X axis. The graph is
displaying data read at a number of different dates over a date range. The
x
axis is displaying the dates.

The problem I am having is that the date format is always MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in US
format.
I have noticed that if I set the enumeration to either auto or manual the
dates show in the correct format but the graph it wrong. If I set it to
NumberFormatEnum.None then the graph is correct but the date format is
wrong.

Does anyone know what I am doing wrong or is there a bug in setting the
NumberFormat?
 
A

Alvin Bruney [MVP]

It's not an article, it's a newsgroup post with a similar issue.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Sputnik said:
Alvin,

I have looked at this article and it does not seem to help me.

This is what I am doing:

// Add the dates to the array
rgDates.Add(SqlData.GetDateTime(idxDate));

// Set the dates
Series.SetData(ChartDimensionsEnum.chDimCategories,
(int)ChartSpecialDataSourcesEnum.chDataLiteral,
rgDates.ToArray());

DateAxis.HasTitle = true;
DateAxis.NumberFormat = "MM/YYYY"

DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingNone;
// DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingAuto;

If I comment out the chAxisGroupingNone line and uncomment the line
below then the date formatting works and I have no idea why!

Ian

Ian said:
Alvin,

Do you mean this article:

Subject: How to display text in the format hh:mm for a category label?

Thanks

--
Ian H


Ian Hannah said:
Alvin,

Thanks for the reply. Unfortunately I have not managed to find the
article
that illustrates the workaround. Could you please give me the details
on the
link?

Thanks

--
Ian H


:

about 4 weeks ago, the issue was identified and a work around was
presented
in the newsgroup, please google for the solution

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------



I am using OWC10 for creating a chart in ASP.NET. I am suing data
read
from
a SQL Database and I am creating a Y axis and an X axis. The graph
is
displaying data read at a number of different dates over a date
range. The
x
axis is displaying the dates.

The problem I am having is that the date format is always
MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in
US
format.
I have noticed that if I set the enumeration to either auto or
manual the
dates show in the correct format but the graph it wrong. If I set
it to
NumberFormatEnum.None then the graph is correct but the date format
is
wrong.

Does anyone know what I am doing wrong or is there a bug in setting
the
NumberFormat?
 
I

Ian Hannah

Alvin,

As I said before I have not managed to find the article that you are
refering to in this newsgroup. There is an article relating to adding a dummy
category so allow times to be displayed correctly but this does not relate to
my issue. I cannot find any other articles concerning dates and numberformat
in this newsgroup.

I would be really grateful if you could give me further details so I can
find this article.

Thanks
Ian H


Alvin Bruney said:
It's not an article, it's a newsgroup post with a similar issue.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Sputnik said:
Alvin,

I have looked at this article and it does not seem to help me.

This is what I am doing:

// Add the dates to the array
rgDates.Add(SqlData.GetDateTime(idxDate));

// Set the dates
Series.SetData(ChartDimensionsEnum.chDimCategories,
(int)ChartSpecialDataSourcesEnum.chDataLiteral,
rgDates.ToArray());

DateAxis.HasTitle = true;
DateAxis.NumberFormat = "MM/YYYY"

DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingNone;
// DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingAuto;

If I comment out the chAxisGroupingNone line and uncomment the line
below then the date formatting works and I have no idea why!

Ian

Ian said:
Alvin,

Do you mean this article:

Subject: How to display text in the format hh:mm for a category label?

Thanks

--
Ian H


:


Alvin,

Thanks for the reply. Unfortunately I have not managed to find the
article
that illustrates the workaround. Could you please give me the details
on the
link?

Thanks

--
Ian H


:

about 4 weeks ago, the issue was identified and a work around was
presented
in the newsgroup, please google for the solution

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------



I am using OWC10 for creating a chart in ASP.NET. I am suing data
read
from
a SQL Database and I am creating a Y axis and an X axis. The graph
is
displaying data read at a number of different dates over a date
range. The
x
axis is displaying the dates.

The problem I am having is that the date format is always
MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in
US
format.
I have noticed that if I set the enumeration to either auto or
manual the
dates show in the correct format but the graph it wrong. If I set
it to
NumberFormatEnum.None then the graph is correct but the date format
is
wrong.

Does anyone know what I am doing wrong or is there a bug in setting
the
NumberFormat?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top