Sport Lap time Input

  • 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

  • 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

  • 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

  • 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.

  • 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

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply