Results 1 to 9 of 9
  1. #1
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65

    Please help, removing date from a timestamp to only show military time


    I have a timestamp on my records that is called [tstime] and it is set to the format for 24 hours,
    but when I go to edit it from a subform it shows "11/8/2017 6:39:06 PM" that format, and they have to erase all of
    it to enter 19:20 or whatever time it is (in military time)


    How do I have it store only the military time? It shows only the military time, but when I go to edit it.. all that extra makes it so hard to edit quickly.

  2. #2
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    You'll still have to store it as a datetime value.
    On the form have you tried setting a format on the display control, and using an input mask?

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Here's a sample using your data, but as Minty said, you should store the date/time field.
    You get the time using timevalue and then format it---For presentation

    Code:
    x=#11/8/2017 6:39:06 PM#
    ?format(timevalue(x),"hh:nn:ss")
    18:39:06
    Good luck.

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    As I asked in your earlier post:

    Why are you editing a timestamp field? A timestamp is (usually) for knowing when a record is created/modified - nothing more.

  5. #5
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65
    I am creating air traffic logs for a small general aviation airfield, and I have the traffic timestamped. But there is an edit subform so that if an incorrect entry is entered, they can go back and change it. And sometimes entries are timestamped *here and now* but are really older entries. I just wanted to get rid of the fluff for ease of use by people who aren't as tech savvy as myself. Which is pretty much everyone here lol.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Hmmmm....
    Maybe I don't understand what you mean by "timestamped". In a past job life, we had paper log books, that eventually migrated to computer based logs. The paper logs had numbered pages and were filled out in ink, because they were legal documents. (used to assign blame ) You couldn't tear out pages or erase entries - could be fired if you did. Entries into the computer log were time stamped and had an audit log for adds & changes. There was the abilits to edit an entry for 24 hrs, then the entry was locked. But everything was recorded in an audit log (table). No way, no time, no how was a timestamped field allowed to be edited.

    I would think that the FAA would also frown upon editing a "timestamp" field.

    But, again, maybe I misunderstand what you mean by "timestamped".

  7. #7
    mcmcd99 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    65
    We have to enter a lot of old data, and we can't timestamp them "here and now" we have to input them with specific times and dates according to their paper written times. And this isn't a big airport. We don't have air traffic control here, or even a tower. This is a small general aviation airfield. The logs are only for the simplification of keeping track of how many aircraft land, what the field usage is, and basic transmission info that can help us provide a better service. So when I say they can edit timestamps, it's not like some big FAA regulated airport, you know? It's so we can count how many aircraft landed, what the busy times were, etc.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    mcmcd99,

    What exactly is the current status of this project?

    What is the report or output data that will be used by whomever? Do you have a sample?

    You have paper records currently. What is the consistent data you have that can be entered into your proposed system/database?

    Does your current paper data go under some review/edit/validate before data entry into the new system?

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    I set the Date/Time field format property to Short Time and display is only the 24-hr time, no date part. Had no problem entering 19:20.

    Make sure textbox Format property has Short Time setting.

    Might want to disable the textbox date picker.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Military Time Blues
    By viperbyte in forum Forms
    Replies: 19
    Last Post: 04-14-2020, 06:45 AM
  2. Replies: 7
    Last Post: 03-16-2014, 03:20 PM
  3. Formatting military time into non-military time
    By WithoutPause in forum Access
    Replies: 3
    Last Post: 11-18-2013, 07:40 AM
  4. Replies: 42
    Last Post: 03-01-2013, 06:58 AM
  5. Military Time
    By tshirttom in forum Access
    Replies: 3
    Last Post: 07-29-2011, 01:29 PM

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