asp calendar datetime format

i have a calendar that displays the information for a date that has been selected on the calendar in a gridview.when a date starts with a zero ie 2009/12/07 nothing is displayed but works for my other dates like 2009/12/22.what am i missing?
here is my code
<asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged"
                                    BorderWidth="1px" NextPrevFormat="FullMonth" BackColor="White" Width="350px"
                                    ForeColor="Black" Height="190px" Font-Size="9pt" Font-Names="Verdana" BorderColor="White">
                                    <TodayDayStyle BackColor="#CCCCCC"></TodayDayStyle>
                                    <NextPrevStyle Font-Size="8pt" Font-Bold="True" ForeColor="#333333" VerticalAlign="Bottom">
                                    </NextPrevStyle>
                                    <DayHeaderStyle Font-Size="8pt" Font-Bold="True"></DayHeaderStyle>
                                    <SelectedDayStyle ForeColor="White" BackColor="#333399"></SelectedDayStyle>
                                    <TitleStyle Font-Size="12pt" Font-Bold="True" BorderWidth="4px" ForeColor="#333399"
                                        BorderColor="Black" BackColor="White"></TitleStyle>
                                    <OtherMonthDayStyle ForeColor="#999999"></OtherMonthDayStyle>
                                </asp:Calendar>
                                <span class="mainheading">Event Location and Dates</span><br />
                                <br />
                                <asp:GridView ID="CalendarList" runat="server" Width="450px" AutoGenerateColumns="False"
                                    CssClass="gridtable" CellPadding="5" BorderColor="#ff3300" BorderWidth="1px"
                                    BackColor="#FFFFFF">
                                    <AlternatingRowStyle BackColor="#F8F8F8" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="EventLocation" HeaderStyle-CssClass="gridheading">
                                            <ItemTemplate>
                                                <asp:Label ID="EventLocLabel" runat="server" Text='<%# Eval("EventLocation") %>'>
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="EventDate" HeaderStyle-CssClass="gridheading">
                                            <ItemTemplate>
                                                <asp:Label ID="EventDateLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "EventDate") %>
'>
                                                </asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>

protected void Page_Load(object sender, EventArgs e)
    {
}
    protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
 
        Calendar Calendar1 = (Calendar)Form.FindControl("Calendar1");
        string connCalendarString = ConfigurationManager.AppSettings["THConnectionString"];
        MySqlConnection cnxCalendar = new MySqlConnection(connCalendarString);
        cnxCalendar.Open();
        MySqlDataAdapter adapterCalendar = new MySqlDataAdapter();
        string cmdCalendarText = ("SELECT EventLocation, EventDate FROM eventstable WHERE EventDate = ?EventDate");
        MySqlCommand cmdCalendar = new MySqlCommand(cmdCalendarText, cnxCalendar);
        cmdCalendar.Parameters.Add(new MySqlParameter("EventDate", Calendar1.SelectedDate.ToString("yyyy/MM/dd")));
        DataSet dsCalendar = new DataSet();
        adapterCalendar.SelectCommand = cmdCalendar;
        adapterCalendar.Fill(dsCalendar);
        GridView CalendarList = (GridView)Form.FindControl("CalendarList");
        CalendarList.DataSource = dsCalendar;
        CalendarList.DataBind();
    }
}


chrispatonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Elvio Lujan.Net Senior DeveloperCommented:
can you set a break point in the line
cmdCalendar.Parameters.Add(new MySqlParameter("EventDate", Calendar1.SelectedDate.ToString("yyyy/MM/dd")));
and tell us what value you get with "Calendar1.SelectedDate" ??
chrispatonAuthor Commented:
hi,
the value is {07/12/2009 00:00:00}
Elvio Lujan.Net Senior DeveloperCommented:
and why do you use the format "yyyy/MM/dd" intead "MM/dd/yyyy"???
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

chrispatonAuthor Commented:
That way seems to be the only way i have found so far that pulls any dates from my table
chrispatonAuthor Commented:
With the date as "MM/dd/yyyy" i get nothing returned.in my table the dates are stored as 2009-12-30
abelallenCommented:
Hi chrispaton,

Kindly navigate to the below url and let me know you got the exact solution for the problem...
http://www.obout.com/calendar/tutorial_titletext.aspx

Thanks,
Abel Allen
chrispatonAuthor Commented:
no it's still not pulling dates that start with a zero ie 2009/12/07
chrispatonAuthor Commented:
ok fixed it there was a problem with my database

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.