Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2005

    Unanswered: CHAR(19) date field formats (was "SQL Statement help")


    I have a table with the following fields:

    ID [char(50]-- unique
    Created_DT [char(19)]
    Updated_DT [char(19)]

    Currently, the Created_DT contains date and time data as follows: '0000-00-00 00:00:00'. The Updated_DT contains dates in this format: '2004-02-16 12:45:03'.

    What I want to do is take the date in the Updated_DT field and copy it into this format to the Created_DT field: '02/16/2004 12:00:00'.

    Can someone tell help me with this?


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    1. have you looked at the SUBSTRING and CONCAT functions?

    2. why aren't they DATE datatypes instead of CHAR? | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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