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

Date & time Data Type formatting



 
 
Thread Tools Display Modes
  #1  
Old October 30th, 2008, 12:23 AM posted to microsoft.public.access
Misty
external usenet poster
 
Posts: 34
Default Date & time Data Type formatting

I'm not sure what caused the problem but my date fields in my table now have
a time of 00:00:00 saved with them. ie. I enter 10/18/2008 and when the data
exports into text it reads "10/18/2008 00:00:00" for the field data. I have
the formating set to Long Date. How do I get rid of the zero timestamp? I can
deal with the short date format I think but how do I make the time go away -
I have no idea where it is even stored at but I think it has to do with the
default formatting for Data Type.

Thanks!
  #2  
Old October 30th, 2008, 12:35 AM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Date & time Data Type formatting

On Wed, 29 Oct 2008 16:23:01 -0700, Misty
wrote:

I'm not sure what caused the problem but my date fields in my table now have
a time of 00:00:00 saved with them. ie. I enter 10/18/2008 and when the data
exports into text it reads "10/18/2008 00:00:00" for the field data. I have
the formating set to Long Date. How do I get rid of the zero timestamp? I can
deal with the short date format I think but how do I make the time go away -
I have no idea where it is even stored at but I think it has to do with the
default formatting for Data Type.

Thanks!


Regardless of the formatting, a Date/Time value always has a time (midnight if
you don't specify it); it's stored internally as a number, a count of days and
fractions of a day since midnight, 12/30/1899.

Exporting will always export the full value (with the time), again regardless
of formatting.

To export just the date, put a calculated field in the query:

ExpDate: Format([datefield], "Short Date")

and export the query rather than the table.
--

John W. Vinson [MVP]
 




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 05:37 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.