A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Changing a Medium Time



 
 
Thread Tools Display Modes
  #1  
Old April 24th, 2008, 05:11 PM posted to microsoft.public.access.forms
stu
external usenet poster
 
Posts: 134
Default Changing a Medium Time

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.
  #2  
Old April 24th, 2008, 07:07 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Changing a Medium Time

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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Stu" wrote in message
news
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.


  #3  
Old April 24th, 2008, 07:59 PM posted to microsoft.public.access.forms
stu
external usenet poster
 
Posts: 134
Default Changing a Medium Time

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?


"Douglas J. Steele" wrote:

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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Stu" wrote in message
news
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.



  #4  
Old April 24th, 2008, 09:08 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Changing a Medium Time

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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Stu" wrote in message
...
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?


  #5  
Old April 24th, 2008, 09:54 PM posted to microsoft.public.access.forms
stu
external usenet poster
 
Posts: 134
Default Changing a Medium Time

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.

"Douglas J. Steele" wrote:

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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Stu" wrote in message
...
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?



  #6  
Old April 25th, 2008, 01:31 AM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Changing a Medium Time

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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Stu" wrote in message
...
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.

"Douglas J. Steele" wrote:

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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Stu" wrote in message
...
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?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.