Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Sport Lap time Input Expand / Collapse
Author
Message
Posted Saturday, February 19, 2011 5:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 01, 2011 4:28 PM
Points: 9, Visits: 14
Hello

Currently I am trying to make this database in Access 2010 before I look into the SQL development and have come across an issue in both Access and SQL.

For my application I need to INPUT (not taken from the system date/time) a time in the value of minutes, seconds and hundreth of a seconds. 'mm:ss.uu' - 1:43.54

I am having issues with this as I am trying not to over complicate the issue but cannot enter this time value in the format I require? I have seen other people using seperate text fields and then joining them together but I am sure there must be a simplier way that I do not know of?

Once I have this issue working I will then be comparing the swim stroke PB time with event times and if a faster time is inputted then throwing up a message then updating the PB time from the event time!

Does any one have any ideas on the inputting of sport time formats? I cannot be the only one trying to do this as sporting applications like Hy-tek do this all the time?

Thanks in Advance

Graham
Post #1066769
Posted Saturday, February 19, 2011 6:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 9:58 AM
Points: 141, Visits: 837
Hi,

Your requirements aren't super clear, so perhaps I am not helping you here.
Here is a script showing how to input time, quite simply in to a demo table that has a column for DATETIME type and TIME type.
The TIME type is only available in SQL Server 2008 onwards - I have no idea of what Access types Access deals with.
CREATE TABLE [dbo].[TimeTable](
[Time1] [datetime] NULL,
[Time2] [time](7) NULL
) ON [PRIMARY]

GO


INSERT INTO [Sandbox].[dbo].[TimeTable]
([Time1]
,[Time2])
VALUES
('00:01:43.54'
,'00:01:43.54')
GO

SELECT [Time1]
,[Time2]
FROM [Sandbox].[dbo].[TimeTable]
GO


Post #1066779
Posted Saturday, February 19, 2011 8:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 01, 2011 4:28 PM
Points: 9, Visits: 14
What the requirements are from a swimming club. We need to record the time taken in any stroke and enter this into a table as minutes, seconds and hundreth of seconds and example of '1:23.45'. This will be entered manually my a user but needs to be in the example format.

Is that any clearer?

Thanks
Post #1066787
Posted Saturday, February 19, 2011 11:16 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 9:58 AM
Points: 141, Visits: 837
I'm a little confused; is the code I supplied inadequate because it has 00 hours and indicates the zero for the tens in the minutes?
I'm taking it for granted that you are aware that in your case it is unlikely that the user will interact directly with SQL Server and that a UI should probably be built that interacts with the database - that would allow the user to input in virtually any format you elect to cater for. Access however is a different story; it has the facility to design a UI of sorts, in the way of a Form.

I hope that this clears things up in some way for you.
Please let me know if you have any more questions.
Post #1066829
Posted Sunday, February 20, 2011 3:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 01, 2011 4:28 PM
Points: 9, Visits: 14
At the moment this is in the design phase and I am looking at issues as the come up. You are right there will be a UI and this may be the correct solution to the format / input of this sport time. I am looking at the database level and what will and will not work!
I just think it is strange that Access or SQL do not deal with this format. Industry standard software for the swimming manage this correctly so I know there must be a clean way of doing this with out over complicating the project!

As soon as I have tested this and gone through a few more things I will post the solution...... Ha asuming I can find one !

Thanks
Post #1066840
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse