UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Date Format, Access 2016    
 
   
meyert
post Mar 2 2018, 08:01 AM
Post#1



Posts: 132
Joined: 22-January 08



I am having a little problem, its not a big deal but it gets on my nerves because I can't make the change

I have data that is in an excel spreadsheet. That date is imported into my database to update records with ship date and ship quantity.

Everything is working fine but the date is formatted long with the time. I don't want the time to show, but I can't figure out how to correct this

Is there a trick or an issue on importing dates and formatting?

The spreadsheet date is medium and my table is formatted medium - - but the stupid date ends up with the time included

If I manually type in the date then no time shows

Any ideas?
This post has been edited by meyert: Mar 2 2018, 08:01 AM
Go to the top of the page
 
HairyBob
post Mar 2 2018, 08:08 AM
Post#2



Posts: 992
Joined: 26-March 08
From: London, UK


Here's a couple of ideas:

http://www.UtterAccess.com/forum/remove-ti...ld-t783012.html

HTH,

Hairy.
Go to the top of the page
 
meyert
post Mar 2 2018, 08:12 AM
Post#3



Posts: 132
Joined: 22-January 08



thank you! Looks like the DateValue is working!!!
This post has been edited by meyert: Mar 2 2018, 08:17 AM
Go to the top of the page
 
HairyBob
post Mar 2 2018, 08:19 AM
Post#4



Posts: 992
Joined: 26-March 08
From: London, UK


Great! yw.gif
Go to the top of the page
 
GroverParkGeorge
post Mar 2 2018, 08:28 AM
Post#5


UA Admin
Posts: 34,109
Joined: 20-June 02
From: Newcastle, WA


Keep in mind that Access stores ALL date/time fields with both the date and the time. Internally, it's the equivalent of a double. The part of the number before the decimal is the number of days since the epoch date for Access, which is 12/30/1899 0:00AM. The part of the number after the decimal is the elapsed time since midnight. (Incidentally, other RSBMS's use different epoch dates.)

For example, right now the local time for me is March 2, 2018 at 5:21AM. Access stores that internally as 43161.2229166667

That's 43,161 days since day one for Access and .22916667 of a day since midnight.

ALL dates are stored this way. If you don't specify the time, it's still stored, as 0.

However, you can FORMAT a date for display any way you want. DateValue(), for example, returns only the date portion, but internally, that's still going to be stored the same way.

Working with dates can be interesting and challenging. It helps, I think, to understand that there is an important distinction between STORING and DISPLAYING all dates.
This post has been edited by GroverParkGeorge: Mar 2 2018, 08:31 AM
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th December 2018 - 09:36 AM