Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Times in SQL Server
suicide
post Sep 10 2004, 03:45 PM
Post #1


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 55
Joined: 7-September 04
Member No.: 351



I want to enter times for running event performances (like 10:26.35 for a person's 2-mile time, for instance). I am using sql server 2000. This is an ongoing concern for me since I do a lot of work with running events. Can someone give me some direction as to how I can best deal with this?

The datetime data types do a lot of converting to 'time-of-day' and that is not what I want. For instance, if I enter a 2-mile time of 10:26.35 (a pretty typical 2-mile time) my db converts it to 10:26:35 AM.

If I use varchar data type there is a ton of code to write when I want to sort the data.

Thanks!
Go to the top of the page
 
+Quote Post
Hercco
post Sep 13 2004, 09:43 AM
Post #2


Super Member
Group Icon

Group: Members
Posts: 595
Joined: 4-September 04
Member No.: 228



I'm not familiar with SQL Server 2000, but I'd guess there is a simple datatype TIME?
That should be exactly what you are looking for.

One option would be to convert the time into seconds and store it as an integer.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Free MySQL Server(15)
  2. Error In Installing MySQL Server(6)
  3. Mirror My MySQL Database To Another Mysql Server(4)
  4. Need To Transfer Data From One Server To Another!(1)
  5. Hosting A Server On Database(6)
  6. Moving Server To Server?(4)
  7. Migrating Databases(2)
  8. MySQL Problem! Can't Connect To Server(11)
  9. What Is The RDBMS Server Of Your Choice ?(5)
  10. New MySQL Server & Blank Fields Problem With Jsp(0)
  11. MySQL Server Wont Start(8)
  12. Script Tables On Sql Server Compact(0)
  13. World Of Warcraft(2)
  14. Database Access On Remote Server W/jsp(0)


 



- Lo-Fi Version Time is now: 2nd December 2008 - 05:38 PM