Results 1 to 3 of 3
  1. #1
    vegetamaker is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    2

    Question Minutes and Seconds format for record in Database

    Good evening. First at all thanks so much for your time.




    Well, I spent hours looking in google an answer for my problem, but without luck (I must admit that I am very novice with Access).


    I am doing a football (soccer) database and I must save the times for differents situations (you know, goals, faults, etc). The problem is the format of the data. I need that it show, per example, 71:28 instead 1:11:28... but the format only let me use 59 minutes. I managed to do it in Excel with [mm]:ss but don't look work in Access.


    I guess I could program a query to calculate it and show it in minutes format, but it isn't exactly what I want. I want save it exactly like said before (71:28).


    I thought I could save it as text, but then I couldn't do correct sorts. Other solution, a weird and not very good one, is save them like number (71'28) but it will not work later if I need calculate total seconds per example.


    Any tips will be welcome.


    Thanks!

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    minutes (and seconds) cannot be greater than 60 - just has hours cannot be greater that 24

    you will need to calculate the number of seconds and use mod and \ to determine the relevant parts.

    time in mins and secs: datediff("s",time1,time2) mod 60 & ":" & datediff("s",time1,time2) \ 60

    it will be a text output so sort on

    datediff("s",time1,time2)

  3. #3
    vegetamaker is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Sep 2016
    Posts
    2
    Thanks for your time Ajax. I will try it ^^

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 03-19-2015, 08:43 AM
  2. Replies: 3
    Last Post: 05-13-2014, 01:55 PM
  3. Replies: 4
    Last Post: 06-12-2013, 10:20 AM
  4. formating hours and minutes to 0.00 format
    By live2ride in forum Access
    Replies: 17
    Last Post: 09-18-2012, 07:52 PM
  5. Convert seconds to HH:MM:SS format
    By sai_rlaf in forum Access
    Replies: 2
    Last Post: 01-19-2012, 12:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums