Home Forums SQL Server 2008 T-SQL (SS2K8) varchar to time or datetime or ARGGHH Please help me. RE: varchar to time or datetime or ARGGHH Please help me.

  • This is a medical records things sp the amount of info I can give out is very limited. We use too many different third party apps that create their own dbs in sql and I've inherited these puppies. We are trying to determine how long a patient waits from the time they are 'checked in' until they are taken to an exam room and until the doc comes in. All those fields are stored in datetime because we created them correctly and I have no problem with that. Now I am tasked with figuring out the difference between the scheduled appt time which is stored in a different db as varchar and the time of checkin (datetime). My results of querying this table might look like this:

    check_in appt_time

    1911-03-02 14:00:00.0001300

    1911-03-02 14:00:00.0000950

    I need to do math with this. Am I asking the impossible?