September 21, 2006 at 4:17 pm
Can I display a datetime column as hh:mm ? All the styles I see under convert are hh:mm:ss
September 21, 2006 at 4:22 pm
well - there's 0 or 100 that gives you hh:mm in AM/PM - would that work ?!
**ASCII stupid question, get a stupid ANSI !!!**
September 21, 2006 at 5:00 pm
I don't want to see the date, only the time.
September 21, 2006 at 5:09 pm
Try this:
select Convert(Char(5),getdate(),108)
September 23, 2006 at 8:04 am
Why can't you let the application display the data correctly to the users??
The server is there (mainly) as a datastore, not a report viewer!
September 24, 2006 at 6:18 pm
True... but sometimes there is no application. Besides, formatting a date is a simple form of data manipulation... why not do "data manipulation" in a database?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 25, 2006 at 4:46 am
Ya I know. But it's always good to see both sides of the coin on this one ... before it goes too far!
September 25, 2006 at 6:11 am
Both sides of the coin? I normally end up looking at the edge of the coin, too
--Jeff Moden
Change is inevitable... Change for the better is not.
September 25, 2006 at 6:19 am
Then start looking at both edges .
September 25, 2006 at 6:20 am
My reasoning on this was that doing some simple concantenation and dressing up the data a bit at the DB level could save network traffic (one field going across rather than 4 or 5) and increase speed.
Not true?
Sam
September 25, 2006 at 6:29 am
Well it's like asking us if 3<5 = true !
Depends how much less data is transfered vs how long it takes to create the string but it's usually a win situation .
September 25, 2006 at 6:46 pm
Concur... my point exactly...
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply