Results 1 to 7 of 7
  1. #1
    panoss is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    59

    I want only time to show up in Date/time field

    I have a date/time field. Format=Short time.
    I want only time (hours:minutes) to appear.
    But when I click in the text box, the full date appears.
    I don't want this.


    Is there a way to fix it?

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    You need to add format criteria for it to display correctly. Try this under your format setting.
    hh:nn

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    That's not going to work; it'll still show as Date and Time when the Control has focus. How, exactly, are you populating this Control?

    Linq ;0)>

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Depends on the control's data source and format used. If control is not enabled or if the table/field data type is set to medium time. Would need more details, but as posted it would work.

  5. #5
    panoss is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    59
    I converted the field to text (from Date/Time) and put a mask: 00:00\-00:00;0;_ (it's for working hours, e.g 09:00-17:00).
    I guess what I needed was a mask and not a format, it works fine.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    A mask will work with Date/Time field as well but not if you want both begin and end times in the same field. How do you expect to calculate elapsed time?
    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.

  7. #7
    panoss is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Oct 2014
    Posts
    59
    I 'm not going to calculate elapsed time, it's just the working hours of shops.
    There will be no calculation based on the working hours.
    But...maybe it's a good thought to replace it with two fields of Date/Time type.
    I 'll have to think a little more on this.

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

Similar Threads

  1. Replies: 7
    Last Post: 09-02-2014, 08:18 AM
  2. Replies: 11
    Last Post: 07-20-2014, 06:22 PM
  3. Subtracting a date/time field from a number to get date/time
    By Lifeseeker1019 in forum Programming
    Replies: 4
    Last Post: 03-28-2014, 12:59 PM
  4. Replies: 5
    Last Post: 03-19-2014, 02:31 PM
  5. VB coding to show current date n time in access form
    By cwwaicw311 in forum Programming
    Replies: 6
    Last Post: 02-10-2010, 09:53 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