union all with different date formats

  • I am combining results from multiple tables using union alls. I need to sort the result by date. The problem that I have is that the date field appears two different ways due to legacy data (VMS/RMS). The two different formats are:

    20071002

    12/27/2006 (substring of date/time field)

    I'd really like to convert the legacy format to the more readable format but any solution that will allow me to have a common format that my application can sort by would be a step in the right direction.

    tia, Jeff

  • Probably the easiest way to fix it would be to load the data into tables with columns of type datetime.

  • Great thanks Michael.

    Jeff

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply