WEB MYSQL Question - Dates

Discussion in 'OT Technology' started by LyFeWoRx, Nov 12, 2008.

  1. LyFeWoRx

    LyFeWoRx 2 + 2 = 4 OT Supporter

    Joined:
    Jul 17, 2006
    Messages:
    120
    Likes Received:
    0
    Location:
    New York, New York
    I know dates are funny. Is this correct on post 2?

    http://forums.asp.net/t/1237938.aspx

    converting YYMMDD to MM/DD/YY

    What's the code for mysql, the YYMMDD contains just numbers, no format.

    :ugh2:
     
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    Post #2 contains the BOL (books online) document for SqlServer, not MySQL. Like the subsequent posts dictate, you can change the default date format for your mysql server, or try to convert the date value on the insert.

    You should really be using an ORM or a framework instead of writing inline sql commands. Especially if you plan on running on a shared host which doesn't allow you to modify mysql server settings.
     

Share This Page