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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date/Time problem please help !



 
 
Thread Tools Display Modes
  #1  
Old December 16th, 2004, 11:54 AM
external usenet poster
 
Posts: n/a
Default Date/Time problem please help !

Hi all,

In one of my tables there is a field defined as date/time. When I add a
record for example 07-12-2004 12:15:00 this is ok.
but when I add a record with 07-12-2004 00:00:00 it goes wrong. The only
thing that after input that is displayed is 07-12-2004.

Why doe Acces trows away the time when it is 00:00:00 and can I do something
about it ?

Please advise,

Thanks a lot in advance,

Bart Janisse





  #2  
Old December 16th, 2004, 12:50 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Bart,

A date/time field in Access is in essence a numeric field which is
diplayed in a certain format by default. The integer part of the number
is the date, 0 being 12/31/1899 (today is 38,337), and the decimal part
is the time (1 being 24 hours, 0.5 being 12 hours etc). So, when you
enter a date with time 00:00:00, you are essenstially entering an
integer numeric value. Then Access doesn't find a time part so it
doesn't display one, much like it wouldn't display a decimal part if one
wasn't stored in a numeric field with no format imposed.
If you want to always display the hour, all you need to do is set the
format of the field to:
"mm-dd-yyyy hh:nn:ss"

HTH,
Nikos

w wrote:
Hi all,

In one of my tables there is a field defined as date/time. When I add a
record for example 07-12-2004 12:15:00 this is ok.
but when I add a record with 07-12-2004 00:00:00 it goes wrong. The only
thing that after input that is displayed is 07-12-2004.

Why doe Acces trows away the time when it is 00:00:00 and can I do something
about it ?

Please advise,

Thanks a lot in advance,

Bart Janisse





  #3  
Old December 16th, 2004, 12:51 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

This may not be relevant, but what "time" is 00:00:00? That seems more like
a "duration" than a "point in time".

Jeff Boyce
Access MVP

w wrote in message . nl...
Hi all,

In one of my tables there is a field defined as date/time. When I add a
record for example 07-12-2004 12:15:00 this is ok.
but when I add a record with 07-12-2004 00:00:00 it goes wrong. The only
thing that after input that is displayed is 07-12-2004.

Why doe Acces trows away the time when it is 00:00:00 and can I do

something
about it ?

Please advise,

Thanks a lot in advance,

Bart Janisse






  #4  
Old December 16th, 2004, 01:41 PM
external usenet poster
 
Posts: n/a
Default

Hi Jeff,

This may not be relevant, but what "time" is 00:00:00? That seems more

like
a "duration" than a "point in time".


Thanks for your response. This may be a stupid question but how do you
specify the time at midnight in a 24 hour format ?

I think that after 23:59:59 comes the next day 00:00:00

Bart


  #5  
Old December 16th, 2004, 02:36 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Access stores the date/time value as a fractional number, where the whole
number represents the date, and the time is the fraction of a day (.5 =
noon; .25 = 6am, ...) It is therefore not losing the time - just not
displaying it. Just as the number:
22
is exactly the same as:
22.000
so the 07-12-2004 is exactly the same as 07-12-2004 00:00:00

If you want Access to display the time anyway, use the Format property of
the field in the table, or the Format property of the text box on your form.
Set it to something like this:
dd\-mm\-yyyy hh:nn:ss
in whatever display format you need.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

w wrote in message
. nl...

In one of my tables there is a field defined as date/time. When I add a
record for example 07-12-2004 12:15:00 this is ok.
but when I add a record with 07-12-2004 00:00:00 it goes wrong. The only
thing that after input that is displayed is 07-12-2004.

Why doe Acces trows away the time when it is 00:00:00 and can I do
something
about it ?

Please advise,

Thanks a lot in advance,

Bart Janisse



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Normal.dot or formatting??? nedkelly2 General Discussion 11 July 2nd, 2007 07:02 PM
Reinstalling OE... KAR Outlook Express 24 August 21st, 2004 06:52 PM
Big Problem. We need the fix Captain K Calendar 0 July 8th, 2004 04:50 PM
Fromatting Problem w/ Document Created in Works Inky Formatting Long Documents 2 May 4th, 2004 04:22 AM
Word 2000 footnote problem: footnotes consistently too high (again) Lori Formatting Long Documents 2 May 1st, 2004 07:15 PM


All times are GMT +1. The time now is 04:54 AM.


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