Hello all, I've tried searching through the lists but haven't been able to find an answer to my problem. If any one can help I would be very grateful, Thanks in advance. Anyway, on to the problem.
I have two tables each with field that contains a date in string format 'YYMMDDhhmmss' I want to get the contents of those fields back as DateTime types. for example "SELECT CONVERT(PatientDateTimeOfBirth, DATETIME) FROM orders" returns the record set with the field as type DateTime. That works great, however when I try to union the results of two selects with the converts in them I get back the original string data not the date type. (simplified example) "(SELECT CONVERT(PatientDateTimeOfBirth, DATETIME) FROM orders) UNION (SELECT CONVERT(PatientDateTimeOfBirth, DATETIME) FROM patients)" This gives me two rows with the one field formatted like 'YYMMDDhhmmss' instead of the datetime type. Does anyone have any suggestions on what to try. Once again, Thanks in advance Andrew Taft -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]