Changing a Medium Time

  • Thread starter Thread starter Stu
  • Start date Start date
S

Stu

This is a follow-up to a question dated 2/11/2008 titled "Medium Time text
box shows year". My data was downloaded, maybe from SQLServer???, to Access
2003. I can display a date/time field on a form just fine using Medium Time
format. But as soon as the field gets focus (datasheet) the year and seconds
also display. (Display field contents is: 8:00AM, but after I put the
cursor in the field I see 1/1/1900 08:00:00AM) Interestingly when I delete
the year, the medium date format persists. Too much data to delete the year
manually, is there a way to display only the time when I'm editting? I've
tried input masks.
 
You need to be aware that Access doesn't really support Times by themselves.
Under the covers, the Date data type is an 8 byte floating point number,
where the integer portion represents the date as the number of days relative
to 30 Dec, 1899, and the decimal portion represents the time as a fraction
of a day. I'm afraid there's no way to change that.
 
I am aware and understand how Dates are stored. Why can I go into the
Date/Time field and edit out the year and then only have the time displayed
from that point on? What happened to the date display in this case?
 
No, you can't. The data type contains both date and time, not just time
only, even if you don't want the date portion.
 
The last time you tried answering one of my posts, you didn't test it.
Create a table with D/T field. Put a time only in one record and a year plus
time in the next record.
 
What you're calling a time-only field contains the date as well (30 Dec,
1899). It will show whenever you try to edit the field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top