Changing a Medium Time

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

Douglas J. Steele

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

Stu

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?
 
D

Douglas J. Steele

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

Stu

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

Douglas J. Steele

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

time edit 1
Need help on auto pop time through a form 1
Time format hh:nn drops leading zero 0
Date and Time 2
Cannot enter time in form 4
date time picker 4
Combobox time 3
Time field continues to show date 3

Top