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. 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. Matt
    Replies:
    1
    Views:
    619
    Matthew Speed
    Nov 8, 2003
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,300
    Michael Borgwardt
    May 30, 2004
  3. Matt
    Replies:
    2
    Views:
    532
    Pete Becker
    Nov 8, 2003
  4. Matt
    Replies:
    3
    Views:
    734
    Richard Heathfield
    Nov 8, 2003
  5. Matt
    Replies:
    11
    Views:
    415
    Aaron Bertrand [MVP]
    Nov 8, 2003
Loading...

Share This Page