I am new to SQL and I am trying to convert an Access 2003 database to Microsoft SQL Server 2000 backend.
I am using combo box in Access that is linked to a SQL table/query with the time information.
I have the properties in Access set to “Medium Time” and this displays as 8:30 AM once the data is in the field.
However, with the use of the dropdown and query the user sees“1900-01-01 08:30:00”
What is the correct Data Type in SQL to be able to view the time data as “8:30AM” instead of viewing it “1900-01-01 08:30:00”?
As a workaround, I have written a query on my font end that coverts the dropdown “1900-01-01 08:30:00" to a text fields and I hide the bound column, so the user only sees the text “8:00 AM” , but when the user goes back to adjust the time the “1900-01-01 08:30:00” reappears during the adjustment but goes back the 8:30 AM as controlled by the properties in Access.
This data needs to be in a datetime format in Access because I am using DateDiff to calculate elapsed time.
I hope that there is enough info here to get an answer
MikeSawt
I am using combo box in Access that is linked to a SQL table/query with the time information.
I have the properties in Access set to “Medium Time” and this displays as 8:30 AM once the data is in the field.
However, with the use of the dropdown and query the user sees“1900-01-01 08:30:00”
What is the correct Data Type in SQL to be able to view the time data as “8:30AM” instead of viewing it “1900-01-01 08:30:00”?
As a workaround, I have written a query on my font end that coverts the dropdown “1900-01-01 08:30:00" to a text fields and I hide the bound column, so the user only sees the text “8:00 AM” , but when the user goes back to adjust the time the “1900-01-01 08:30:00” reappears during the adjustment but goes back the 8:30 AM as controlled by the properties in Access.
This data needs to be in a datetime format in Access because I am using DateDiff to calculate elapsed time.
I hope that there is enough info here to get an answer
MikeSawt