Database date and string question

Discussion in 'ASP .Net' started by jm, Nov 5, 2003.

  1. jm

    jm Guest

    I have a field in my datagrid:

    <asp:BoundColumn DataField="alrTime" HeaderText="Last Checked"
    DataFormatString="{0:MM-dd-yyyy HH:mm}"/>

    CAST(max(ta.alertid) as date) as alertid

    however, when it prints it just puts

    MM-dd-yyyy HH:mm

    This is because the max() function (mysql) makes the column a string
    and evidently nothing is going to change that. Is there a way to get
    to the string before it is rendered in the datagrid so that I can
    parse it out manually? Thanks
     
    jm, Nov 5, 2003
    #1
    1. Advertisements

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. Matt
    Replies:
    1
    Views:
    815
    Matthew Speed
    Nov 8, 2003
  2. Learner
    Replies:
    2
    Views:
    8,261
    Erik Funkenbusch
    Mar 10, 2006
  3. Martin Eyles

    Date Formats of Date in Database

    Martin Eyles, Mar 28, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    1,973
    Martin Eyles
    Mar 29, 2006
  4. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,756
    Michael Borgwardt
    May 30, 2004
  5. Matt
    Replies:
    2
    Views:
    737
    Pete Becker
    Nov 8, 2003
  6. Matt
    Replies:
    3
    Views:
    913
    Richard Heathfield
    Nov 8, 2003
  7. Matt
    Replies:
    11
    Views:
    623
    Aaron Bertrand [MVP]
    Nov 8, 2003
  8. davyb
    Replies:
    7
    Views:
    386
    Gregory Brown
    Nov 18, 2005
Loading...