MySQL and ASP.NET question

Discussion in 'ASP .Net Web Controls' started by Mvk, Apr 28, 2004.

  1. Mvk

    Mvk Guest

    Hello;

    I have a mysql database with a table column 'OrderUntil'. I declared this
    column type: Time.
    I get the value in my HTML code by using:
    DataBinder.Eval(Container.DataItem, "OrderUntil");

    Now I want to pass the resulting value to a function: GetHoursComboIndex as
    follows:

    GetHoursComboIndex((DateTime)(DataBinder.Eval(Container.DataItem,
    "OrderUntil")))

    The problem is: the DataBinder.Eval(Container.DataItem, "OrderUntil") value
    cannot be casted to a DateTime value.
    Any idea how I map the Time type OrderUntil column to a C# DateTime type ?
    (or another type).

    Regards
    MVK
     
    Mvk, Apr 28, 2004
    #1
    1. Advertising

  2. DateTime.Parse?

    "Mvk" <> wrote in message
    news:408f9c99$0$21473$...
    > Hello;
    >
    > I have a mysql database with a table column 'OrderUntil'. I declared this
    > column type: Time.
    > I get the value in my HTML code by using:
    > DataBinder.Eval(Container.DataItem, "OrderUntil");
    >
    > Now I want to pass the resulting value to a function: GetHoursComboIndex

    as
    > follows:
    >
    > GetHoursComboIndex((DateTime)(DataBinder.Eval(Container.DataItem,
    > "OrderUntil")))
    >
    > The problem is: the DataBinder.Eval(Container.DataItem, "OrderUntil")

    value
    > cannot be casted to a DateTime value.
    > Any idea how I map the Time type OrderUntil column to a C# DateTime type ?
    > (or another type).
    >
    > Regards
    > MVK
    >
    >
     
    Robert Phillips, Apr 28, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravi
    Replies:
    6
    Views:
    1,422
    Suchandra Thapa
    Jul 21, 2003
  2. Jeffrey H. Coffield
    Replies:
    1
    Views:
    1,897
  3. Roedy Green
    Replies:
    0
    Views:
    1,486
    Roedy Green
    Jul 23, 2009
  4. dave
    Replies:
    4
    Views:
    1,398
    Steve Holden
    Nov 18, 2010
  5. bin liu
    Replies:
    1
    Views:
    138
    Curt Hibbs
    Dec 22, 2004
Loading...

Share This Page