Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    124

    Unanswered: convert string date to mysql date

    How do i convert a STRING DATE TO VALID MYSQL date AND UPDATE ADJACENT FIELD

    where origBUCert_crt is like 12/17/20012

    UPDATE CertificationB set OrBuCert_crt= (STR_TO_DATE('origBUCert_crt','%d,%m,%Y'))

    Thanks

    Nick

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    try not putting quotes around the column name
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2009
    Posts
    124
    No luck yet!
    Here is what I tried:
    UPDATE CertificationC set OrBuCert_crt= STR_TO_DATE(origBUCert_crt,'%m,%d,%Y')

    I also tired UPDATE CertificationC set OrBuCert_crt= (STR_TO_DATE(origBUCert_crt,'%m,%d,%Y'))

    attached is the file
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2009
    Posts
    124
    Never mind, I forgot to use slash instead of comma

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •