Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL date/time display problem

Author  Topic 

chobo
Starting Member

11 Posts

Posted - 2004-04-01 : 17:30:54
I just uploaded my tables to sql server, and am using access to run the forms. In one listbox I have a few fields that I want to display only the time ex. (9:00pm) which works good in access, but in sql the listbox displays the date + the time (04/01/2004 + 9:00pm).
The datatype I am using is datetime length 8.

I also have a strange problem with modifying records. In access it takes one click on my "modify record" button I made to change a field in a record, but in sql it now requires two clicks. Anyone know what could cause this?

Any help is appreciated.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-04-01 : 17:36:48
To get the time portion only in SQL Server,

SELECT CONVERT(CHAR(8), DateTimeColumnName, 108)
FROM...

Tara
Go to Top of Page

chobo
Starting Member

11 Posts

Posted - 2004-04-03 : 04:03:51
thx for the help, it works fine now :)
Go to Top of Page
   

- Advertisement -