importing in date and time problems

  • Hi,

     

    I'm currently importing a date field into SQL using the Enterprise Manager.

    The format is as follows:

    dd/mm/yyyy hh:mm:ss am

    But as soon as I've installed it into the SQL database it appears as:

     

    dd/mm/yyyy

    Completley losing the time details.  How can I do the import to correct this?  Any help would be greatly appreciated

     

    Cheers

     

    Mark

     

  • How are you inserting the data?

    Can you send the table definition and the code to insert in?

  • Might this be text?  You may need to do an explicit convert; CONVERT( datetime, 'dd/mm/yyyy hh:mm:ss am'). 

    Either way, this is a guess, and as Remi asked, it would be helpful to see your code and table definition. 

    I wasn't born stupid - I had to study.

  • what data type are you using in the table?

    and sometimes when using EM the dates show funny,

    use Query analyzer to validate your dates

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

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